pmgl / microstudio

Free, open source game engine online
MIT License
921 stars 103 forks source link

Wrong microScript transpiler output of while statement in some cases #49

Closed lukq closed 2 years ago

lukq commented 2 years ago

I've tested this online at https://microstudio.dev/ .

When the project uses "microScript v1 - transpiled" language, the following piece of code is transpiled incorrectly. The update statement is evaluated incorrectly which leads to an infinite loop execution. It manifests as a Timeout error.

  ox=0
  while (ox+=1)<=3
    y=0
  end
pmgl commented 2 years ago

Thanks for the perfect minimal test case btw, it helped a lot! :-)