j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
It is possible for BootX to purposefully divide by zero expecting 0 as the result.
Index: kernel/forth.c =================================================================== --- kernel/forth.c (revision 1041) +++ kernel/forth.c (working copy) @@ -1157,6 +1157,12 @@ { const ucell b = POP(); const ducell a = DPOP(); + + if (b == 0) { // can't divide by zero + PUSH(0); + DPUSH(0); + return; + } #ifdef NEED_FAKE_INT128_T if (a.hi != 0) { fprintf(stderr, "mudivmod called (0x%016llx %016llx / 0x%016llx)\n",
Attachments: