RandyGaul / cute_headers

Collection of cross-platform one-file C/C++ libraries with no dependencies, primarily used for games
4.3k stars 270 forks source link

Skip 'ff' in hex values, causing issues with mingw #236

Closed aganm closed 3 years ago

aganm commented 3 years ago

I was parsing color properties with no issue on linux, but when I ran it on windows (mingw), the color value was wrong. I pin pointed the issue being strtol returning -1 when parsing the hex string. The implementation must work differently, skipping the first two unused 'ff' in the hex string fixes it.

aganm commented 3 years ago

Tiled stores color values in 2 possibles lengths. Either #000000 or #ff0000000. Before my commit, the first works but the latter doesn't work, with my commit the latter works but the first doesn't work anymore.