Skip to content

Subtraction overflow in build_escape_pod #1

@dodomorandi

Description

@dodomorandi

Running the game in debug triggers a subtraction overflow at nox_planet/src/region/builder/buildings.rs:21:26 (and obviously the following line is affected as well). I imagine that the intended behavior is to overflow and take the modulo of layer height/width, right?

I can send you a PR if you want, I know that this is you personal project, so I am happy to give some tiny help and I don't get offended if you say no ☺️

In any case, I listened to the podcast in which you were talking about this project. Really, really awesome work! Thank you for your efforts and your passion ❤️

P.S.: I just changed the initialization process to use wgpu::BackendBit::DX12 to wgpu::BackendBit::PRIMARY to make it work on Mac, everything seems fine!

P.P.S.: Uh, it looks like there are some similar issues around, I just got another overflow in nox_planet/src/region/builder/flags.rs:85:43 -- these are tricky to find without the overflow checker at runtime (almost impossible in C++ 🙄).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions