Comments (1)
I've incorrectly posted that investigation into the wrong issue. But it is actually about this one:
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
m_aName
field. DDNet does this by shifting the rest of the fields whenm_Version <= 2
: https://github.com/ddnet/ddnet/blob/master/src/game/layers.cpp#L69-L104.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.
from libtw2.
Related Issues (20)
- wireshark-dissector: Add empty values like tw.sys.enter_game etc. HOT 1
- wireshark-dissector: Allow to load protocol specs at runtime
- wireshark-dissector: Support the low-level 0.7 protocol
- wireshark-dissector: Doesn't compile on Windows HOT 1
- teehistorian2demo: Windows debug binary overflows stack
- teehistorian2demo: Teehistorian(UnexpectedEnd) (exit code: 1) HOT 4
- ddnet_properties should check for more tiles (and on more layers, not just game)
- wireshark-dissector: update to new stable version 3.6 from 3.4 HOT 1
- gamenet: Publish to crates.io HOT 3
- wireshark-dissector: Make the dissector for snapshots much more granular. HOT 1
- demo version 6 HOT 1
- wireshark-dissector: Fix Windows build HOT 2
- wireshark-dissector: Fix Windows cross-compiled build HOT 1
- ddnet_properties: SWITCH_TIMED tile wrongly detected
- wireshark-dissector: Resent 0.7 packet marked as broken
- wireshark-dissector: Not identifying as TW with custom server HOT 6
- Remove `ref_slice` dependency
- wireshark-dissector: crash wmem_alloc: assertion failed HOT 4
- wireshark-dissector: failed to parse 1460 byte rcon cmd and map list packet HOT 2
- gamenet: missing connless info (inf3) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libtw2.