]> granicus.if.org Git - php/commitdiff
Kill compiler warnings in ext/com_dotnet
authorKalle Sommer Nielsen <kalle@php.net>
Wed, 23 Aug 2017 22:52:48 +0000 (00:52 +0200)
committerKalle Sommer Nielsen <kalle@php.net>
Wed, 23 Aug 2017 22:52:48 +0000 (00:52 +0200)
ext/com_dotnet/com_olechar.c

index f155f2ed4571c2b6ae5450a8fc77330abcf63d79..31115e29c59c874ca8233fc27f7fb725673a427a 100644 (file)
@@ -50,7 +50,7 @@ PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, size_t str
                This should be fixed by reallocating the olestring, but as emalloc is used, that doesn't
                matter much. */
                ok = MultiByteToWideChar(codepage, flags, string, (int)string_len, olestring, (int)string_len);
-               if (ok > 0 && ok < string_len) {
+               if (ok > 0 && (size_t)ok < string_len) {
                        olestring[ok] = '\0';
                }
        } else {