Skip to content

Fix crash on blueprint book creation, also refactor get_blueprint#41

Open
sparr wants to merge 2 commits intodewiniaid:masterfrom
sparr:crashfix-blueprint-book-inventory
Open

Fix crash on blueprint book creation, also refactor get_blueprint#41
sparr wants to merge 2 commits intodewiniaid:masterfrom
sparr:crashfix-blueprint-book-inventory

Conversation

@sparr
Copy link

@sparr sparr commented Aug 23, 2020

LuaItemStack.active_index is 1 (not nil or 0) for a brand new empty blueprint book, which led to a crash when that index in the inventory was accessed.

While I was in there I also refactored get_blueprint from recursive to iterative.

Fixes #39

@morsk
Copy link

morsk commented Aug 28, 2020

I just tried this and it worked for me.

@junhinhow
Copy link

Work's like a charm for me too...

@rpdelaney
Copy link

See also #43

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

Successfully merging this pull request may close these issues.

Creating Blueprint Book causes crash

4 participants