]> git.saurik.com Git - wxWidgets.git/commit
Fix incorrect use of setlocale() in wxLocale::IsAvailable().
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 6 Apr 2011 14:37:27 +0000 (14:37 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 6 Apr 2011 14:37:27 +0000 (14:37 +0000)
commitfd1c361c33b5fc259d9c62e7c816e753cc1b1dd3
tree008fcb704d8261d1ca6566394080ad52af6be8cc
parent3668a4f69eb559bdc568c334de722a1fed5d2792
Fix incorrect use of setlocale() in wxLocale::IsAvailable().

The return value of setlocale() was used incorrectly in this code: it
represents the newly set locale and not the previously active one so we didn't
actually restore the original locale before.

Fix the code and check that we do actually restore the locale in a new unit
test for it.

See #13117.

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