Log In  

0

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.

bug crash
P#48065 2018-01-11 17:36 ( Edited 2018-01-12 17:06)

::

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?

P#48079 2018-01-12 11:37

::

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.

P#48084 2018-01-12 14:46

::

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.

P#48087 2018-01-12 17:06

Log in to post a comment

user:
password:

New User | Account Help
:: New User
X
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2018-01-20 11:11 | 0.215s | 1572k | Q:13