From ec3a91e44465498aac63fc4a0bd83695c00353d5 Mon Sep 17 00:00:00 2001 From: Antoine Fraboulet Date: Sun, 5 Nov 2006 13:30:54 +0000 Subject: [PATCH] - _wtoi correction --- game/encoding.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/game/encoding.cpp b/game/encoding.cpp index dc21d17..274da98 100644 --- a/game/encoding.cpp +++ b/game/encoding.cpp @@ -33,13 +33,7 @@ int _wtoi(const wchar_t *iWStr) { - int res = 0; - while (iswdigit(iWStr[0])) - { - res = 10 * res + (iWStr[0] - '0'); - iWStr++; - } - return res; + return wcstol(iWStr,NULL,10); }