mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
expansionOfs cannot be negative
lexerState->expansionOfs is always either set to 0, or updated by
adding a positive quantity:
if (distance > lexerState->expansions->distance) {
lexerState->expansionOfs += distance - lexerState->expansions->distance;
...
}
so it will always be positive or zero.
This commit is contained in:
@@ -364,7 +364,7 @@ struct LexerState {
|
|||||||
size_t macroArgScanDistance; /* Max distance already scanned for macro args */
|
size_t macroArgScanDistance; /* Max distance already scanned for macro args */
|
||||||
bool expandStrings;
|
bool expandStrings;
|
||||||
struct Expansion *expansions;
|
struct Expansion *expansions;
|
||||||
size_t expansionOfs; /* Offset into the current top-level expansion (negative = before) */
|
size_t expansionOfs; /* Offset into the current top-level expansion */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LexerState *lexerState = NULL;
|
struct LexerState *lexerState = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user