diff options
Diffstat (limited to 'src/config.cc')
| -rw-r--r-- | src/config.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/config.cc b/src/config.cc index bae583a..0be4eec 100644 --- a/src/config.cc +++ b/src/config.cc @@ -128,14 +128,10 @@ void ReadConfig(void){ return; } - // TODO(fusion): Probably some `expectIdentifier` function inlined? - // It seems `getIdentifier` also does the same check so this one is - // redundant? - if(Script.Token != IDENTIFIER){ - Script.error("Identifier expected"); - } - - char *Identifier = Script.getIdentifier(); + // TODO(fusion): If the following `readSymbol` calls `nextToken`, then the + // buffer the identifier is in will get wiped. (UPDATE: Yes, the original + // version copies it into a local stack buffer, lol.) + const char *Identifier = Script.readIdentifier(); Script.readSymbol('='); // TODO(fusion): Ughh... Get rid of all `strcpy`s. A malicious configuration |
