Menu

#25 Serious bug in DIVISION_OP (numbers.c)

open
nobody
None
9
2013-01-31
2013-01-31
Goblin
No

Any MOO can be put down by feeding them one of the following;
;$minint / -1
;$minint % -1

For some reason, this throws an Floating Point Exception in numbers.c (322) in DIVISION_OP

Discussion

  • Goblin

    Goblin - 2013-01-31
    • priority: 5 --> 9
     
  • Goblin

    Goblin - 2013-01-31

    Patch

     
  • Goblin

    Goblin - 2013-01-31

    There are two ways to fix this.. Either a new error is being introduced (Overflow exception) or we catch these particular cases and make them overflow correctly..
    I've chosen the latter one, simply because it's the easiest one and a new error type would probably not be very useful..

    Because I couldn't separate the / sign from % sign in the DIVISION_OP macro, I had to split it in two functions.. Anyone that has a better solution is invited to come up with a patch!

    Anyway, the fix is included and has been tested!

     

Log in to post a comment.