diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-05-24 20:57:24 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-05-24 20:57:24 -0300 |
| commit | 3f557369c7bbd08fdf2e6dbd9271873b20a9a144 (patch) | |
| tree | 28bb9b4ad9c0324036d753eea772855a180c37f3 /src/config.cc | |
| parent | b7432b4e74284138f1740f4577b9cb32e1f120d0 (diff) | |
| download | game-3f557369c7bbd08fdf2e6dbd9271873b20a9a144.tar.gz game-3f557369c7bbd08fdf2e6dbd9271873b20a9a144.zip | |
halfway of `map.cc` and start of `objects.cc`
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 |
