Giter Club home page Giter Club logo

Comments (1)

Fireball-Teeworlds avatar Fireball-Teeworlds commented on June 10, 2024

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 when m_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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.