diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 29fbd8a..b13a4d5 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -1681,7 +1681,7 @@ PUGI__NS_BEGIN for (;;) { - if (static_cast(ch - '0') <= 9) + if (static_cast(static_cast(ch) - '0') <= 9) ucsc = 10 * ucsc + (ch - '0'); else if (ch == ';') break; @@ -6436,7 +6436,7 @@ PUGI__NS_BEGIN { while (exponent > 0) { - assert(*mantissa == 0 || static_cast(*mantissa - '0') <= 9); + assert(*mantissa == 0 || static_cast(static_cast(*mantissa) - '0') <= 9); *s++ = *mantissa ? *mantissa++ : '0'; exponent--; }