Log In  


0.1.11f on Linux x64. I've found that it crashes if I do this:

cstore(0x2000, 0x2000, 0x1000, nil)

If I simply omit the filename argument, it works fine.



hey @Saffith

The reason that parameter is in [brackets] is to show it's optional. It shouldn't crash though, just throw an error.

Is it closing pico-8 entirely, or showing an error message?


It's crashing. Segfault in strlen.
Generally, passing nil does the same thing as omitting the argument, and I expected that would be the case here. Maybe that doesn't apply to built-in functions? I haven't really looked into that.
I was doing this in a function that took the filename as an argument and simply forwarded it to cstore. I figured the argument would be optional, but it didn't work out that way.


Thanks for the heads up, Saffith -- this is now fixed in 0.1.11g. It was also crashing the same way for reload. Both are indeed supposed to behave the same way whether the argument is omitted or given as nil.



[Please log in to post a comment]