]> git.saurik.com Git - wxWidgets.git/commitdiff
added lowercase functionality to wxHexToDec
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 10 May 2001 16:06:38 +0000 (16:06 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 10 May 2001 16:06:38 +0000 (16:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/utilscmn.cpp

index 77de515356e7e69bc6022444e305ec3834996b7e..f563515d18e553ed91c1f40c5ac4031e1181efcc 100644 (file)
@@ -329,7 +329,7 @@ int wxHexToDec(const wxString& buf)
   else
     secondDigit = buf.GetChar(1) - wxT('0');
 
-  return firstDigit * 16 + secondDigit;
+  return (firstDigit & 0xF) * 16 + (secondDigit & 0xF );
 }
 
 // Convert decimal integer to 2-character hex string