The function STAFStringToUInt() was written to handle
numbers other than base 10. However, there is a
minor bug which prevents it from handling anything
above base 10.
Line 913:
dig = *ptr - 0x57; // A = 10, B = 11, ... and so on
should be changed to:
dig = (*ptr | 0x20) - 0x57; // A = 10, B = 11, ...
otherwise the unsigned int "dig" is set to a negative
value. Correction is supplied in the attached file.
STAFString.cpp
Logged In: YES
user_id=285070
Thank you for submitting this patch.
Logged In: YES
user_id=285070
Implemented this patch via Bug #1533482.
This fix will be in the next release of STAF (V3.1.5).