Skip to content

Commit

Permalink
XS: revert "performing pointer subtraction with a null pointer has un…
Browse files Browse the repository at this point in the history
…defined behavior" without warning
  • Loading branch information
Patrick Soquet committed Dec 22, 2022
1 parent 50567ce commit 4e23805
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xs/sources/xsMapSet.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,8 @@ txU4 fxSumEntry(txMachine* the, txSlot* slot)
}
else {
if (XS_REFERENCE_KIND == kind) {
sum = slot->value.reference - the->firstHeap; //(txSlot*)NULL;
txSlot* base = C_NULL;
sum = slot->value.reference - base;
}
else if (XS_INTEGER_KIND == kind) {
fxToNumber(the, slot);
Expand Down

0 comments on commit 4e23805

Please sign in to comment.