Skip to content

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

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

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

Conversation

@sparr

@sparr sparr commented Aug 23, 2020

Copy link
Copy Markdown

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

morsk commented Aug 28, 2020

Copy link
Copy Markdown

I just tried this and it worked for me.

@junhinhow

Copy link
Copy Markdown

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

@rpdelaney

Copy link
Copy Markdown

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