-
Notifications
You must be signed in to change notification settings - Fork 16
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
map_properties: maps/zbSkyCraft.map: Error(Df(Df(TooShort))) #16
Comments
This is due to m_Version of layer # 31 having a value of 322. Here's the struct in DDNet repo: https://github.com/ddnet/ddnet/blob/master/src/game/mapitems.h#L302. We use version to decide whether the structure should contain libtw2 does something similar, but only distinguishes values of 2 and 3 (also possibly 0 and 1), failing for other values: https://github.com/heinrich5991/libtw2/blob/master/map/src/format.rs#L244-L246. There isn't a separate error for this situation at the moment so it gets incorrectly attributed to the layer buffer being too short. Since apparently we don't encounter this error often, most of the maps must have values up to 3. However, we could make libtw2 behavior consistent with DDNet and just treat all versions higher than 2 equally. This would also remove the need to improve error reporting - we'd remove this error situation completely. |
This makes the behavior consistent with DDNet and fixes parsing for some unusual maps (fixes heinrich5991#16).
…ling This makes the behavior consistent with DDNet and fixes parsing for some unusual maps (fixes heinrich5991#16).
This makes the behavior consistent with DDNet and fixes parsing for some unusual maps (fixes heinrich5991#16).
Thanks for investigating. |
Oh, I've just noticed that all this time I've been investigating the map from #15. Sorry for that, I've reposted my comment there. |
I think this map may be legitimately corrupted. I can't get the editor to open it. |
http://maps.ddnet.tw/zbSkyCraft_4475fbc8_17d53689f94b8a01a89d50c96f8702e568812ee7f37c324ed63c0265cb741c60.map
The text was updated successfully, but these errors were encountered: