diff options
| author | Rob Richards <rrichards@php.net> | 2005-11-27 12:21:12 +0000 |
|---|---|---|
| committer | Rob Richards <rrichards@php.net> | 2005-11-27 12:21:12 +0000 |
| commit | 93ee6cd53313dc3e259c24aa936eb89b2e882cec (patch) | |
| tree | 887e63e0d916429bec2ba0c92ebebbe353f7d6ab /ext/com_dotnet/com_variant.c | |
| parent | 1bec704ea7bddb276873408646ec2e8fc2c52526 (diff) | |
| download | php-git-93ee6cd53313dc3e259c24aa936eb89b2e882cec.tar.gz | |
Fixed bug #35316 (Application exception trying to create COM object)
Fix some handler signatures causing memory corruption
Various unicode fixes
Diffstat (limited to 'ext/com_dotnet/com_variant.c')
| -rw-r--r-- | ext/com_dotnet/com_variant.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 7c3ea12c5a..573237d370 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -217,7 +217,13 @@ PHPAPI int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC break; case VT_BSTR: if (V_BSTR(v)) { - ZVAL_UNICODE(z, V_BSTR(v), 1); + if (UG(unicode)) { + ZVAL_UNICODE(z, V_BSTR(v), 1); + } else { + Z_TYPE_P(z) = IS_STRING; + Z_STRVAL_P(z) = php_com_olestring_to_string(V_BSTR(v), + &Z_STRLEN_P(z), codepage TSRMLS_CC); + } } break; case VT_UNKNOWN: |
