summaryrefslogtreecommitdiff
path: root/win32/winutil.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2020-05-15 15:36:51 +0800
committerXinchen Hui <laruence@gmail.com>2020-05-15 15:36:51 +0800
commit446d189aa00dcca5eb66a78a26bb92cf8d919343 (patch)
tree0f6c47cde758609e3df3276027e2be33bf56cee9 /win32/winutil.c
parentccd41e083359cf6dd264f88806dce4cc49d9358e (diff)
parent8c6d006b55bf5ba230dda672344dbd0e2a7d4be3 (diff)
downloadphp-git-446d189aa00dcca5eb66a78a26bb92cf8d919343.tar.gz
Merge branch 'PHP-7.4' of git.php.net:/php-src into PHP-7.4
* 'PHP-7.4' of git.php.net:/php-src: Fix #79557: extension_dir = ./ext now use current directory for base Fix #79596: MySQL FLOAT truncates to int some locales [ci skip] Fix NEWS
Diffstat (limited to 'win32/winutil.c')
-rw-r--r--win32/winutil.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/win32/winutil.c b/win32/winutil.c
index c04664bab3..8cf5cdc1e7 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -440,7 +440,13 @@ PHP_WINUTIL_API char *php_win32_get_username(void)
static zend_always_inline BOOL is_compatible(const char *name, BOOL is_smaller, char *format, char **err)
{/*{{{*/
- PLOADED_IMAGE img = ImageLoad(name, NULL);
+ /* work around ImageLoad() issue */
+ char *name_stripped = name;
+ if (name[0] == '.' && IS_SLASH(name[1])) {
+ name_stripped += 2;
+ }
+
+ PLOADED_IMAGE img = ImageLoad(name_stripped, NULL);
if (!img) {
DWORD _err = GetLastError();