SethRobinson / RTDink

Dink Smallwood HD is an old school zelda-like adventure/RPG that has been ported to many platforms. C++/OpenGL
Other
57 stars 7 forks source link

Fixing hard crash when DinkC script divides by zero #7

Closed drone1400 closed 3 months ago

drone1400 commented 10 months ago

Instead of hard crashing, a log error entry is made when a script attempts to divide a variable by 0 or call modulo function with 0

I think this is a preferable way for the game to behave, although perhaps logging the error AND hard crashing might be preferable in order to force the DMOD author to fix the issue in their scripts?... On the other hand, many DMOD authors are not around, and hard crashes are just frustrating for the player. Continuing the script (even if in a possibly unintended way) is probably preferable...

SethRobinson commented 3 months ago

Thanks!