Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save upgrade logic for saves predating v1.1.14 broken (caused by #1241) #1314

Open
yarukishi opened this issue Dec 19, 2024 · 2 comments
Open

Comments

@yarukishi
Copy link
Contributor

PR #1241 adds filtering code to the lastMsg property of a save file of unknown version to importGame() in functions.js. The lastMsg data structure has a different topology in sufficiently old save data, causing an exception to be thrown during import. This completely prevents the save data from being loaded.

https://www.reddit.com/r/EvolveIdle/comments/1hgslhi/how_to_port_saves_i_tried_repeatedly_and_no_luck/
sample.txt

@yarukishi
Copy link
Contributor Author

Note that replacing the content of lastMsg in an older save file with an empty array [] bypasses the issue, because it avoids execution of the statement msg.c = msg.c.replaceAll('"', '') in importGame().

@BadAtEveryGame
Copy link
Contributor

BadAtEveryGame commented Dec 21, 2024

Oops...

Bandaid fix would be to remove the save filtering from importGame(), and change the following:

let new_message = $('<p class="has-text-'+color+'"></p>').text(msg);

queue.append($('<p class="has-text-'+msg.color+'"></p>').text(msg.msg));

queue.append($('<p class="has-text-'+msg.color+'"></p>').text(msg.msg));

To have be something like +color.replaceAll('"', '')+ instead.


A bit yucky since it's filtering the color every time the message is displayed, but admittedly I'm not familiar enough with legacy save formats to figure out a proper solution...

Otherwise the color filtering could honestly just be rid of entirely, since I doubt someone would actually exploit it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants