Unified · Split
| @@ -438,7 +438,7 @@ typedef struct TokenSym { · 437 unmodified lines | ||
| 438 | 438 | struct Sym *sym_identifier; /* direct pointer to identifier */ |
| 439 | 439 | int tok; /* token number */ |
| 440 | 440 | int len; |
| 441 | − char str[1]; | |
| 441 | + char str[]; | |
| 442 | 442 | } TokenSym; |
| 443 | 443 | |
| 444 | 444 | #ifdef TCC_TARGET_PE |
| @@ -490,7 +490,7 @@ static TokenSym *tok_alloc_new(TokenSym **pts, const char *str, int len) · 489 unmodified lines | ||
| 490 | 490 | table_ident = ptable; |
| 491 | 491 | } |
| 492 | 492 | |
| 493 | − ts = tal_realloc(&toksym_alloc, 0, sizeof(TokenSym) + len); | |
| 493 | + ts = tal_realloc(&toksym_alloc, 0, sizeof(TokenSym) + len + 1); | |
| 494 | 494 | table_ident[i] = ts; |
| 495 | 495 | ts->tok = tok_ident++; |
| 496 | 496 | ts->sym_define = NULL; |