summaryrefslogtreecommitdiff
path: root/src/pugixml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r--src/pugixml.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 694a1a6..9bb054e 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -4350,6 +4350,10 @@ PUGI__NS_BEGIN
{
s += 2;
+ // since overflow detection relies on length of the sequence skip leading zeros
+ while (*s == '0')
+ s++;
+
const char_t* start = s;
for (;;)
@@ -4370,6 +4374,10 @@ PUGI__NS_BEGIN
}
else
{
+ // since overflow detection relies on length of the sequence skip leading zeros
+ while (*s == '0')
+ s++;
+
const char_t* start = s;
for (;;)