fix infinite loop in shop

This commit is contained in:
2026-02-15 15:41:09 -06:00
parent ebd624b772
commit 56de0ce803
19 changed files with 36483 additions and 35863 deletions

View File

@@ -850,9 +850,14 @@ static inline objhdr_t *chase(JSValue v) {
updated to follow the chain to the live copy. */
static inline void mach_resolve_forward(JSValue *slot) {
if (JS_IsPtr(*slot)) {
objhdr_t h = *(objhdr_t *)JS_VALUE_GET_PTR(*slot);
if (objhdr_type(h) == OBJ_FORWARD) {
*slot = JS_MKPTR(objhdr_fwd_ptr(h));
objhdr_t *oh = (objhdr_t *)JS_VALUE_GET_PTR(*slot);
if (objhdr_type(*oh) == OBJ_FORWARD) {
do {
objhdr_t *next = (objhdr_t *)objhdr_fwd_ptr(*oh);
if (!next) break;
oh = next;
} while (objhdr_type(*oh) == OBJ_FORWARD);
*slot = JS_MKPTR(oh);
}
}
}