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

Add missing type check to InvRef:set_lists() #10476

Merged
merged 1 commit into from
Oct 11, 2020

Conversation

Zughy
Copy link
Member

@Zughy Zughy commented Oct 9, 2020

  • Goal of the PR
    Avoiding a segmentation fault crash (AKA the whole client)
  • How does the PR work?
    I've added a table check
  • Does it resolve any reported issue?
    One of the problems in Many Lua C functions are missing type checks #1794. I'd like to fix them all but I thought about starting with one

To do

This PR is Ready for Review.

How to test

minetest.register_on_joinplayer(function(player, last_login)
  minetest.after(1, function()
    player:get_inventory():set_lists()
  end)
end)

the client won't crash anymore (but the game will, of course)

@Zughy Zughy changed the title InvRef:set_lists() doesn't cause a segmentation fault anymore InvRef:set_lists() doesn't cause a segmentation fault crash anymore Oct 9, 2020
@rubenwardy rubenwardy added Bugfix 🐛 PRs that fix a bug Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines labels Oct 9, 2020
@sfan5 sfan5 changed the title InvRef:set_lists() doesn't cause a segmentation fault crash anymore Add missing type check to InvRef:set_lists() Oct 10, 2020
@SmallJoker SmallJoker merged commit 272b723 into minetest:master Oct 11, 2020
JosiahWI pushed a commit to JosiahWI/minetest that referenced this pull request Oct 17, 2020
HybridDog pushed a commit to HybridDog/minetest that referenced this pull request Dec 17, 2020
@Zughy Zughy deleted the zughy-set_lists_crash branch January 2, 2021 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 PRs that fix a bug Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants