diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-05-25 00:25:01 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-05-25 00:25:01 -0300 |
| commit | 5f883a80175a4cc9abda9d647a6a0d73bda84878 (patch) | |
| tree | d585487084c455a5ff0659a8cff6fdaf9d357ba9 /src/config.cc | |
| parent | 3f557369c7bbd08fdf2e6dbd9271873b20a9a144 (diff) | |
| download | game-5f883a80175a4cc9abda9d647a6a0d73bda84878.tar.gz game-5f883a80175a4cc9abda9d647a6a0d73bda84878.zip | |
move string utility to `util.cc` + small script identifier fix
Diffstat (limited to 'src/config.cc')
| -rw-r--r-- | src/config.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/config.cc b/src/config.cc index 0be4eec..e3e3c85 100644 --- a/src/config.cc +++ b/src/config.cc @@ -128,10 +128,8 @@ void ReadConfig(void){ return; } - // 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(); + char Identifier[MAX_IDENT_LENGTH]; + strcpy(Identifier, Script.readIdentifier()); Script.readSymbol('='); // TODO(fusion): Ughh... Get rid of all `strcpy`s. A malicious configuration |
