diff options
-rw-r--r-- | fref.lex | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -124,7 +124,11 @@ field() yytext[strcspn(yytext, "\n")] = 0; /* Fill corresponding field. */ - #define FI(s,m) if(strncmp(yytext,s,2) == 0 && (yytext += 3)){ \ + #define FI(s,m) if(strncmp(yytext,s,2) == 0){ \ + /* Don't copy empty field. */ \ + if(strlen(yytext) < 3) \ + return; \ + yytext += 3; \ strcpy(m, yytext); \ return; \ } |