--- fuppes-0.660/src/lib/Common/Common.cpp	2009-12-20 21:26:29.000000000 +0100
+++ src/src/lib/Common/Common.cpp	2012-09-17 21:20:36.019069479 +0200
@@ -390,41 +390,7 @@
 
 unsigned int HexToInt(std::string sHex)
 {  
-  /* remove leading "0" */   
-  if(sHex.find_first_not_of("0", 0) <= sHex.length())
-    sHex = sHex.substr(sHex.find_first_not_of("0", 0), sHex.length());
-  
-  /* taken from: http://bdn.borland.com/article/0,1410,17203,00.html */  
-  int n = 0;         // position in string
-  int m = 0;         // position in digit[] to shift
-  int count;         // loop index
-  unsigned int intValue = 0;  // integer value of hex string
-  int digit[10];     // hold values to convert
-  while (n < 9) {
-     if (sHex[n]=='\0')
-        break;
-     if (sHex[n] > 0x29 && sHex[n] < 0x40 ) //if 0 to 9
-        digit[n] = sHex[n] & 0x0f;            //convert to int
-     else if (sHex[n] >='a' && sHex[n] <= 'f') //if a to f
-        digit[n] = (sHex[n] & 0x0f) + 9;      //convert to int
-     else if (sHex[n] >='A' && sHex[n] <= 'F') //if A to F
-        digit[n] = (sHex[n] & 0x0f) + 9;      //convert to int
-     else break;
-    n++;
-  }
-  count = n;
-  m = n - 1;
-  n = 0;
-  while(n < count) {
-     // digit[n] is value of hex digit at position n
-     // (m << 2) is the number of positions to shift
-     // OR the bits into return value
-     intValue = intValue | (digit[n] << (m << 2));
-     m--;   // adjust the position to set
-     n++;   // next digit to process
-  }
-
-  return intValue;
+        return strtoul(sHex.c_str(), NULL, 16);
 }
 
 std::string SQLEscape(std::string p_sValue)
