summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--win32/winutil.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/win32/winutil.c b/win32/winutil.c
index 7da505b1b4..a886964bf0 100644
--- a/win32/winutil.c
+++ b/win32/winutil.c
@@ -438,7 +438,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();