Jump to content

[Bug Report] recipe.lua's MergeRecipes() doesn't guard SaveIndex check sufficiently


Recommended Posts

If something causes MergeRecipes to get called before SaveIndex gets instantiated (e.g. a modmain calls GetRecipe()), then the game crashes due to SaveIndex not being initialized. On line 72, in the MergeRecipes() function, it checks this:

    if not SaveGameIndex then

which I believe is intended to protect against this very case. However, it needs to be checking with rawget instead to avoid crashing.

 


View full bug

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...