mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-23 03:22:08 +00:00
Merge pull request #327 from NieDzejkob/symbol-length-check
Fix symbol length checking
This commit is contained in:
@@ -188,7 +188,7 @@ uint32_t ParseSymbol(char *src, uint32_t size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (copied > MAXSYMLEN)
|
if (copied >= MAXSYMLEN)
|
||||||
fatalerror("Symbol too long");
|
fatalerror("Symbol too long");
|
||||||
|
|
||||||
dest[copied] = 0;
|
dest[copied] = 0;
|
||||||
@@ -206,7 +206,7 @@ uint32_t ParseSymbol(char *src, uint32_t size)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(yylval.tzString, dest);
|
strcpy(yylval.tzSym, dest);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user