forked from scratchfoundation/scratch-vm
-
Notifications
You must be signed in to change notification settings - Fork 113
Description
Was looking over the quicksort snapshot changes again in #275 and something felt weird. Found this minimal test case
Before #275
b0.value = p0;
while (!(("" + listGet(b1.value, b0.value)).toLowerCase() === "something".toLowerCase())) {
b0.value = ((+b0.value || 0) + 1);
}After #275
b0.value = p0;
while (!(("" + (b1.value[(b0.value | 0) - 1] ?? "")).toLowerCase() === "something".toLowerCase())) {
b0.value = ((+b0.value || 0) + 1);
}It's now assuming that b0.value is always a number but it's getting initialized to p0 which could instead be set to "random" or "last"
Tacodiva
Metadata
Metadata
Assignees
Labels
No labels