[PATCH] ntdll: Pass the start of the string to compose_string().

Huw Davies huw at codeweavers.com
Thu Jul 2 04:44:16 CDT 2020


Fixes a regression caused by 520040dc4a287fd62d7d5161c083cee990c3d6e6.

Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/ntdll/unix/env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c
index 789a3984052..eb75e6e949a 100644
--- a/dlls/ntdll/unix/env.c
+++ b/dlls/ntdll/unix/env.c
@@ -557,7 +557,7 @@ DWORD ntdll_umbstowcs( const char *src, DWORD srclen, WCHAR *dst, DWORD dstlen )
         }
         reslen = dstlen - (dstend - dst);
 #ifdef __APPLE__  /* work around broken Mac OS X filesystem that enforces NFD */
-        if (reslen && nfc_table) reslen = compose_string( nfc_table, dst, reslen );
+        if (reslen && nfc_table) reslen = compose_string( nfc_table, dst - reslen, reslen );
 #endif
     }
     return reslen;
-- 
2.23.0




More information about the wine-devel mailing list