diff --git a/src/TmxColor.cpp b/src/TmxColor.cpp index edb61dd..3d09493 100644 --- a/src/TmxColor.cpp +++ b/src/TmxColor.cpp @@ -57,7 +57,7 @@ namespace Tmx Color::Color(const std::string& str) { // We skip the first # character and then read directly the hexadecimal value - color = std::strtol((str.c_str() + 1), nullptr, 16); + color = std::strtoul((str.c_str() + 1), nullptr, 16); // If the input has the short format #RRGGBB without alpha channel we set it to 255 if(str.length() == 7) color |= 0xff000000;