# HG changeset patch # User Laurent Bessard # Date 1350940134 -7200 # Node ID 1b6f337222e0c1da58544e00debcce9368517f2f # Parent dd57e63bdc3d2e8f6550e819947efd8363081d4b Fix bug in code for pragma with double brackets diff -r dd57e63bdc3d -r 1b6f337222e0 stage1_2/iec_flex.ll --- a/stage1_2/iec_flex.ll Mon Oct 22 17:44:40 2012 +0200 +++ b/stage1_2/iec_flex.ll Mon Oct 22 23:08:54 2012 +0200 @@ -849,7 +849,7 @@ /* Any other pragma we find, we just pass it up to the syntax parser... */ /* Note that the state is exclusive, so we have to include it here too. */ {pragma} {/* return the pragmma without the enclosing '{' and '}' */ - uint cut = yytext[1]=='{'?2:1; + int cut = yytext[1]=='{'?2:1; yytext[strlen(yytext)-cut] = '\0'; yylval.ID=strdup(yytext+cut); return pragma_token;