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

Fix NodeDef backwards compatibility to 5.3.0 #11942

Merged
merged 2 commits into from
Jan 12, 2022

Conversation

SmallJoker
Copy link
Member

  1. Fixes crashes on older clients when [png is used as base image
  2. Fixes liquid type assertion fails on debug builds

Both reported in #10737 (comment), whereas (1) is the original crash cause.

To do

This PR is Ready for Review.

How to test

  1. Compile Minetest 5.3.0 with nodedef.cpp changes if you don't want a Debug build:
    • Old: assert(liquid_type == LIQUID_SOURCE);
    • New: FATAL_ERROR_IF(liquid_type != LIQUID_SOURCE,"a");
    • Old: assert(liquid_type == LIQUID_FLOWING);
    • New FATAL_ERROR_IF(liquid_type != LIQUID_FLOWING,"b");
  2. Host a 5.4.0 devtest game
  3. Join with 5.3.0 and enjoy SIGSEGV and assertion fails
  4. Test again with this PR

1. Fixes crashes on older clients when [png is used as base image
2. Fixes liquid type assertion fails on debug builds
@SmallJoker SmallJoker added the Bugfix 🐛 PRs that fix a bug label Jan 8, 2022
src/nodedef.cpp Outdated Show resolved Hide resolved
src/nodedef.cpp Outdated Show resolved Hide resolved
@lhofhansl
Copy link
Contributor

Where is @hecktest ?

Copy link
Member

@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 5.0.1, 5.1.1, 5.2.0, 5.3.0, 5.4.1 - all fine

@sfan5 sfan5 added this to the 5.5.0 milestone Jan 9, 2022
@SmallJoker SmallJoker merged commit b2eb44a into minetest:master Jan 12, 2022
LoneWolfBT pushed a commit to MT-CTF/minetest that referenced this pull request Feb 13, 2022
1. Fixes crashes on older clients when [png is used as base image
2. Fixes liquid type assertion fails on debug builds
@SmallJoker SmallJoker deleted the liquid_rcompat branch June 4, 2022 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants