mirror of
https://github.com/VARCem/Vasm.git
synced 2026-04-23 13:49:44 +00:00
Check and enforce range limit on the [w] modifier in expressions.
This commit is contained in:
@@ -602,6 +602,8 @@ expr(char **p)
|
||||
/* Lossless conversion to word. */
|
||||
*p += 3;
|
||||
v = compare(p);
|
||||
if (DEFINED(v) && v.v > 0xffff)
|
||||
error(ERR_RNG_WORD, NULL);
|
||||
SET_TYPE(v, TYPE_WORD);
|
||||
} else {
|
||||
/* Iterate. */
|
||||
|
||||
Reference in New Issue
Block a user