]> git.saurik.com Git - wxWidgets.git/commit
Fix bugs in parsing wxLongLong values starting with zeroes.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 30 Aug 2012 20:22:17 +0000 (20:22 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 30 Aug 2012 20:22:17 +0000 (20:22 +0000)
commit8421cb3c7cab3017fd991ee628126813ee2d794a
tree549a85fa0a0871d4f63c02ffa4a416fc3f6d8a1f
parentcc699de848bcead97528901420ee975df1b9442a
Fix bugs in parsing wxLongLong values starting with zeroes.

wxCRT_StrtoullBase(), used by wxString::To[U]LongLong(), didn't handle leading
zeroes nor leading 0x correctly: it never auto-detected base 8; didn't ignore
the leading 0 even if base 8 was specified explicitly; didn't recognize "0X"
prefix at all (only "0x").

Fix all these bugs and add test cases for parsing numbers in other bases to
the unit tests.

Closes #14596.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/wxcrt.cpp
tests/strings/strings.cpp