msvcp: fixed char_traits<char>::to_int_type
Andrey Zhezherun
zhezherun at yandex.ru
Thu Oct 31 18:35:21 CDT 2013
This patch fixes char_traits<char>::to_int_type. It needs to cast to
unsigned char instead of an int so that 0xff is not confused with EOF.
Regards,
Andrey
-------------- next part --------------
--- wine-1.7.5.orig/dlls/msvcp71/string.c 2013-10-25 18:45:30.000000000 +0100
+++ wine-1.7.5/dlls/msvcp71/string.c 2013-10-30 11:09:56.000000000 +0000
@@ -162,7 +162,7 @@
/* ?to_int_type@?$char_traits at D@std@@SAHAEBD at Z */
int CDECL MSVCP_char_traits_char_to_int_type(const char *ch)
{
- return (int)*ch;
+ return (unsigned char)*ch;
}
/* ?eq_int_type@?$char_traits at D@std@@SA_NABH0 at Z */
--- wine-1.7.5.orig/dlls/msvcp90/string.c 2013-10-25 18:45:30.000000000 +0100
+++ wine-1.7.5/dlls/msvcp90/string.c 2013-10-30 11:09:56.000000000 +0000
@@ -162,7 +162,7 @@
/* ?to_int_type@?$char_traits at D@std@@SAHAEBD at Z */
int CDECL MSVCP_char_traits_char_to_int_type(const char *ch)
{
- return (int)*ch;
+ return (unsigned char)*ch;
}
/* ?eq_int_type@?$char_traits at D@std@@SA_NABH0 at Z */
More information about the wine-patches
mailing list