]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix compilation ofr ports without native font info, such as wxDFB.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Feb 2012 23:34:45 +0000 (23:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Feb 2012 23:34:45 +0000 (23:34 +0000)
Don't use wxString::ToLong() with short variable.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/fontcmn.cpp

index fed694a96d433a7217a9f106c897c36d2733d777..52936bfbe16e094a8499ffeb7ff3a0befe2475b9 100644 (file)
@@ -603,12 +603,12 @@ void wxNativeFontInfo::SetFaceName(const wxArrayString& facenames)
 bool wxNativeFontInfo::FromString(const wxString& s)
 {
     long l;
-    short version;
+    unsigned long version;
 
     wxStringTokenizer tokenizer(s, wxT(";"));
 
     wxString token = tokenizer.GetNextToken();
-    if ( !token.ToLong(&version) || version < 0 || version > 1 )
+    if ( !token.ToULong(&version) || version > 1 )
         return false;
 
     token = tokenizer.GetNextToken();