From 3ef31a97aab2d088441af693c9f3dca63cb97bb3 Mon Sep 17 00:00:00 2001 From: SLAwww Date: Fri, 18 Mar 2016 03:15:05 +0200 Subject: [PATCH] ECC now works properly with long paths --- Sources/Ecc/Scanner.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Ecc/Scanner.l b/Sources/Ecc/Scanner.l index 2a2d85c..554b7e6 100644 --- a/Sources/Ecc/Scanner.l +++ b/Sources/Ecc/Scanner.l @@ -14,7 +14,7 @@ int iLastLine = -1; yylval = yytext; \ } else { \ char strLine[512]; \ - snprintf(strLine, 512, "\n#line %d \"%s\"\n", _iLinesCt, _strInputFileName);\ + sprintf(strLine, "\n#line %d \"%s\"\n", _iLinesCt, _strInputFileName);\ yylval = SType(strLine)+yytext; \ iLastLine=_iLinesCt; \ } \ @@ -129,7 +129,7 @@ EXP_FLT (({DIGIT}+("."({DIGIT}*)?)?)("E"|"e")("+"|"-")?{DIGIT}+) /* specially bracketed cpp blocks */ "%{" { char strLine[512]; - snprintf(strLine, 512, "#line %d \"%s\"\n", _iLinesCt, _strInputFileName ); + sprintf(strLine, "#line %d \"%s\"\n", _iLinesCt, _strInputFileName ); _strCppBlock = strdup(strLine); BEGIN(CPPBLOCK); }