Mineclonia/mods
sfan5 62d5b547a0
Fix non-serializable item entity unload crash
Some items, like shulkers or books, can have so much metadata that the
corresponding item entity can not be serialized by the Minetest engine.

Without this patch, dropping such an item and then moving away crashes
Minetest, as it can not serialize the entity with serializeString16()
when unloading a map block.

The patch resets the overlong metadata of non-serializable item entities.
This avoids a crash and makes it possible to retrieve a “sanitized” item
without metadata when the mapblock containing the item entity is reloaded.

Originally sfan5 guessed the maximum possible item entity serialization size
that would not lead to a crash as 65530 bytes, but anon5 calculated it to be
actually 65487 bytes. This has been experimentally verified by erlehmann.
2021-07-30 17:13:26 +02:00
..
CORE Fix server crash when players dig unknown nodes 2021-06-17 23:39:13 +02:00
ENTITIES Fix non-serializable item entity unload crash 2021-07-30 17:13:26 +02:00
ENVIRONMENT Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
HELP Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
HUD Do not send useless HUDCHANGE packets 2021-07-21 10:28:04 +02:00
ITEMS Make dragon egg teleport on punching 2021-07-13 09:11:48 +02:00
MAPGEN Generate pig spawners in mineshafts 2021-07-23 04:11:33 +02:00
MISC Move data from deprecated files to mod.conf 2021-05-16 13:44:04 +02:00
PLAYER Send FOV packets only when necessary 2021-07-04 03:25:05 +02:00