mstefarov / fNbt

A C# library for reading and writing Named Binary Tag (NBT) files and streams. A continuation of libnbt project, originally by Erik Davidson (aphistic).
116 stars 31 forks source link

TAG_End as type for empty lists #12

Closed NiclasOlofsson closed 9 years ago

NiclasOlofsson commented 9 years ago

According to the "spec" at http://minecraft.gamepedia.com/NBT_format

"It may also be the type of empty List tags."

In the code for NbtList it doesn't allow END tags as type for the list hence barfs on some (many) region files.

mstefarov commented 9 years ago

Thanks for bringing this to my attention, Niclas! I was not aware of this quirk. I'll have it fixed this week.

NiclasOlofsson commented 9 years ago

I can provide a pull for the fix if that helps speed up the release? About 50% of the worlds loding are affected by this right now. But i guess that the actual "fix" is not what takes time, right?

mstefarov commented 9 years ago

The hard part is finding the time :)

A quick fix (in the pull request) is possible, but I need to check for side effects, and add various sanity checks and unit tests (for example, it should not be possible to have a non-empty list of end-tags). And then package and distribute it.

I expect to have it all done within 24 hours though. I'm sorry about the wait!

NiclasOlofsson commented 9 years ago

Yeah, was a very dirty quick fix :-) The changes you made looks good. I'll wait for it to update NuGet and then test it.

mstefarov commented 9 years ago

NuGet update was just pushed!