AsherGlick / Burrito

An overlay tool for Guild Wars 2 that works on linux
GNU General Public License v2.0
75 stars 18 forks source link

Gracefully handle values above sintmax and uintmax #288

Open AsherGlick opened 1 month ago

AsherGlick commented 1 month ago

The following tests cause the xml converter to try to parse a value larger then a signed int32 max

<POI AchievementBit="2147483648" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI AchievementBit="4294967295" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />

The error is

terminate called after throwing an instance of 'std::out_of_range'

xml_converter should be able to gracefully handle this error as a linter error and not crash the entire program.