GothicKit / ZenKit

A re-implementation of file formats used by the early 2000's ZenGin
http://zk.gothickit.dev/
MIT License
49 stars 9 forks source link

Incorrect parsing of `mds::event_tag` #72

Closed lmichaelis closed 1 year ago

lmichaelis commented 1 year ago

Testing locally: game hangs at loading. Context:

// model_script.cc : make_event_tag
case mds::event_tag_type::window: {  // evt.type == mds::event_tag_type::dam_multiply
    auto frames = a.value_or(""); // "1.0"
    std::istringstream stream {frames};

    int32_t fr = 0;
        while (!stream.eof()) { // fails to parse string, before eof
        stream >> fr;
        evt.frames.push_back(fr);
    }

So 2 issues here:

https://github.com/Try/OpenGothic/issues/483#issuecomment-1629756309