mirror of
https://github.com/php/php-src.git
synced 2025-01-27 14:13:41 +08:00
- init err (and simplify)
This commit is contained in:
parent
7f3100976f
commit
17c1ba460d
@ -79,7 +79,6 @@ PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, i
|
||||
length = WideCharToMultiByte(codepage, 0, olestring, -1, string, length, NULL, NULL);
|
||||
ok = length > 0;
|
||||
} else {
|
||||
err = GetLastError();
|
||||
string = (char*)emalloc(sizeof(char));
|
||||
*string = '\0';
|
||||
ok = FALSE;
|
||||
@ -87,7 +86,7 @@ PHPAPI char *php_com_olestring_to_string(OLECHAR *olestring, uint *string_len, i
|
||||
}
|
||||
|
||||
if (!ok) {
|
||||
char *msg = php_win_err(err);
|
||||
char *msg = php_win32_error_to_msg(GetLastError());
|
||||
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING,
|
||||
"Could not convert string from unicode: `%s'", msg);
|
||||
|
Loading…
Reference in New Issue
Block a user