Prism-Menu icon indicating copy to clipboard operation
Prism-Menu copied to clipboard

[Bug?]: Changing the type of a previously saved hack value crashes game on startup

Open glistermelon opened this issue 1 year ago • 2 comments

Platform

Windows

Version

live build (as of 2/24 7pm)

Describe the bug

iffy about calling this a bug, but in the (unlikely) event that any hack's stored value type is changed, the game will crash every time you start it unless you manually remove the old value from the save file.

won't be an actual problem unless such a change actually happens though, but it's not impossible

Expected Behavior

the game shouldn't crash, and the invalid saved value should probably be erased

How to reproduce

again iffy about calling this a bug because you'll never encounter this unless you're actually developing hacks but

  • add a bool-type hack
  • run the game so that a value is assigned to it and is saved
  • change the hack's type to float
  • run the game again

Mods Installed

devtools and prism menu

Crash Logs

crash occurs in the JSON parser, in any of the as_[type] functions

Additional Context

No response

glistermelon avatar Feb 25 '24 04:02 glistermelon

There isn't really any functionality of "transitioning" hack types over, as I never intended to switch hack types. I could implement a check where it checks if the type is invalid, and if it is, reset to default value, although this is very unlikely to happen unless someone or I wants to change the hack type to something else.

FireMario211 avatar Feb 25 '24 19:02 FireMario211

Yeah. Honestly there's no point in worrying about it unless it actually becomes a problem, especially since no end user will actually encounter it.

glistermelon avatar Feb 26 '24 16:02 glistermelon