force sc_tokens size and token enumeration size to match

This commit is contained in:
Yashas 2018-12-31 10:34:38 +05:30
parent 01c2dcaeb4
commit d60ef405c9
2 changed files with 5 additions and 2 deletions

View File

@ -421,7 +421,10 @@ enum {
teLOCAL, /* local variable (name or offset) */
teFUNCTN, /* Pawn function */
teNATIVE, /* native function */
teNONNEG , /* nonnegative integer */
teNONNEG, /* nonnegative integer */
tlexLAST = teNONNEG,
/* for assigment to "lastst" only (see SC1.C) */
tEXPR,
tENDLESS, /* endless loop */

View File

@ -2133,7 +2133,7 @@ SC_FUNC void lexinit(void)
_lexnewline=FALSE;
}
char *sc_tokens[] = {
char *sc_tokens[tlexLAST-tFIRST+1] = {
"*=", "/=", "%=", "+=", "-=", "<<=", ">>>=", ">>=", "&=", "^=", "|=",
"||", "&&", "==", "!=", "<=", ">=", "<<", ">>>", ">>", "++", "--",
"...", "..",