mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix __FILE__, __TIME__ and __DATE__
If they don't have quotes when passed to sym_AddString() they can't be used at all by the assembler. I suppose nobody actually used them, they seem to have been broken forever. Added a comment to the function to say how to use it correctly for strings. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -346,7 +346,9 @@ fstk_Init(char *s)
|
||||
{
|
||||
char tzFileName[_MAX_PATH + 1];
|
||||
|
||||
sym_AddString("__FILE__", s);
|
||||
char tzSymFileName[_MAX_PATH + 1 + 2];
|
||||
snprintf(tzSymFileName, sizeof(tzSymFileName), "\"%s\"", s);
|
||||
sym_AddString("__FILE__", tzSymFileName);
|
||||
|
||||
strcpy(tzFileName, s);
|
||||
pFileStack = NULL;
|
||||
|
||||
Reference in New Issue
Block a user