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:
Rangi authored and Eldred Habert committed 2021-04-16 10:23:37 +02:00
1 parent eba06404f0
commit f69e666b00
1 file changed
+1 -1
+1 -1
View File
@@ -364,7 +364,7 @@ struct LexerState {
size_t macroArgScanDistance; /* Max distance already scanned for macro args */
bool expandStrings;
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;