mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Only increment the unique \@ ID when it is first used per context (#1030)
This avoids changes to generated `\@` labels just by adding or removing macros or loops which do not actually use `\@`. Fixes #1019
This commit is contained in:
@@ -285,6 +285,9 @@ static void newContext(struct FileStackNode *fileInfo)
|
||||
++contextDepth;
|
||||
fstk_NewRecursionDepth(maxRecursionDepth); // Only checks if the max depth was exceeded
|
||||
|
||||
// Save the current `\@` value, to be restored when this context ends
|
||||
contextStack->uniqueID = macro_GetUniqueID();
|
||||
|
||||
struct Context *context = malloc(sizeof(*context));
|
||||
|
||||
if (!context)
|
||||
|
||||
Reference in New Issue
Block a user