paladin-t / b8

BASIC8 - The Fantasy Computer/Console!
https://paladin-t.github.io/b8/
221 stars 15 forks source link

Crash when using modulo for floating point #27

Closed JasonNumberThirteen closed 5 years ago

JasonNumberThirteen commented 5 years ago

I accidentally typed float value for MOD operation and after first frame of execution, it freezes completely the software and vanishes (crash). If modulo for floats aren't supported it should be notification from compiler to change into integer value. Using this in if-conditional:

if t MOD 0.5 > 0.25 then : where 't' is a counter of elapsed time with delta time addition,

crashes "BASIC8" immediately.

paladin-t commented 5 years ago

Thanks for the bug report.

Fixed.