cvs: php4 /ext/com conversion.c
| From: | Harald Radi | Date: | Wed, 15 May 2002 17:59:48 +0000 |
| Subject: | cvs: php4 /ext/com conversion.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11941@lists.php.net to get a copy of this message | ||
phanto Wed May 15 13:59:48 2002 EDT
Modified files:
/php4/ext/com conversion.c
Log:
this should finally fix bug #14353
Index: php4/ext/com/conversion.c
diff -u php4/ext/com/conversion.c:1.45 php4/ext/com/conversion.c:1.46
--- php4/ext/com/conversion.c:1.45 Thu Apr 25 02:37:21 2002
+++ php4/ext/com/conversion.c Wed May 15 13:59:47 2002
@@ -770,7 +770,7 @@
if (strlen == -1) {
/* request needed buffersize */
- strlen = MultiByteToWideChar(codepage, (codepage == CP_UTF8 ? 0 : MB_PRECOMPOSED) |
MB_ERR_INVALID_CHARS, C_str, -1, NULL, 0);
+ strlen = MultiByteToWideChar(codepage, (codepage == CP_UTF8 ? 0 : MB_PRECOMPOSED |
MB_ERR_INVALID_CHARS), C_str, -1, NULL, 0);
} else {
/* \0 terminator */
strlen++;
@@ -780,7 +780,7 @@
unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR) * strlen);
/* convert string */
- error = !MultiByteToWideChar(codepage, (codepage == CP_UTF8 ? 0 : MB_PRECOMPOSED) |
MB_ERR_INVALID_CHARS, C_str, strlen, unicode_str, strlen);
+ error = !MultiByteToWideChar(codepage, (codepage == CP_UTF8 ? 0 : MB_PRECOMPOSED |
MB_ERR_INVALID_CHARS), C_str, strlen, unicode_str, strlen);
} else {
/* return a zero-length string */
unicode_str = (OLECHAR *) emalloc(sizeof(OLECHAR));