From 486bdad41ef324887ae42c5da68f46ea34b03c82 Mon Sep 17 00:00:00 2001 From: midipix Date: Jul 06 2016 08:41:05 +0000 Subject: pe_impl_strlen_utf16(): fix calculation regression caused by commit 239ee42e. --- diff --git a/src/internal/pe_impl.c b/src/internal/pe_impl.c index 594f23d..c586b63 100644 --- a/src/internal/pe_impl.c +++ b/src/internal/pe_impl.c @@ -36,7 +36,7 @@ int32_t pe_impl_strlen_utf16(const wchar16_t * str) for (wch = (wchar16_t *)str; (wch < upper_bound) && (*wch); wch++); if (wch < upper_bound) - return (uint32_t)(wch - str); + return ((uint32_t)(wch - str)) * sizeof(wchar16_t); else return -1; }