SamiKalliomaki / eppabasic

A new web based basic language inspired by CoolBasic.
Other
11 stars 3 forks source link

Having a call to UCase makes screen permanently black #56

Closed expositionrabbit closed 9 years ago

expositionrabbit commented 9 years ago

This is a very weird bug. Needs further testing on other platforms.

But, yes. Having any call to UCase in my code (including in subprograms, excluding in subprograms that are never called, including calling Wait 10000 before the call) stops my screen from displaying anything. Just the black background.

Quick code to paste in to test the issue:

Print "This doesn't display"
Print "Nor does this"
FillTriangle 5, 40, 200, 50, 100, 200
UCase("a")

Nothing appears on the screen.

Print "This displays"
Print "This also"
FillTriangle 5, 40, 200, 50, 100, 200
'UCase("a")

Both messages and the triangle appear.

fergusq commented 9 years ago

I have the same issue. It appears that in there's a bug in the implementation of UCase, https://github.com/Scintillo/eppabasic/blob/master/runtime/worker/string.js. It calls esrever.toUpperCase() while it seems obvious that it should use str.toUpperCase().

henkkuli commented 9 years ago

This has been fixed in the new runtime.