fix offset range check

This commit is contained in:
Quentin Carbonneaux 2026-05-07 08:32:30 +02:00
parent a450a08e03
commit 6fa30d5e22

2
load.c
View File

@ -174,7 +174,7 @@ rebase(Slice *sl)
if (rtype(sl->ref) != RTmp) if (rtype(sl->ref) != RTmp)
return; return;
a = &curf->tmp[sl->ref.val].alias; a = &curf->tmp[sl->ref.val].alias;
if (a->offset < 1<<16) if (a->offset == (short)a->offset)
if (a->type == ALoc if (a->type == ALoc
|| a->type == AEsc || a->type == AEsc
|| a->type == AUnk) { || a->type == AUnk) {