aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-10-06 16:02:54 +0000
committerlloyd <[email protected]>2009-10-06 16:02:54 +0000
commitf05bf5994ae8955501e2355b63ec35e575125374 (patch)
tree53fa417baa6d4db816067b5cc93dbbbd9b09906d
parent7fdaf97767b3f63f4c6768c61755a0f67d9b9b13 (diff)
In to_u32bit, ignore space characters in input
-rw-r--r--src/utils/parsing.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/parsing.cpp b/src/utils/parsing.cpp
index bdb9e79dc..58a8e0b38 100644
--- a/src/utils/parsing.cpp
+++ b/src/utils/parsing.cpp
@@ -23,6 +23,9 @@ u32bit to_u32bit(const std::string& number)
{
const u32bit OVERFLOW_MARK = 0xFFFFFFFF / 10;
+ if(*j == ' ')
+ continue;
+
byte digit = Charset::char2digit(*j);
if((n > OVERFLOW_MARK) || (n == OVERFLOW_MARK && digit > 5))