From 486bdad41ef324887ae42c5da68f46ea34b03c82 Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 6 Jul 2016 04:30:11 -0400 Subject: pe_impl_strlen_utf16(): fix calculation regression caused by commit 239ee42e. --- src/internal/pe_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/internal') 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; } -- cgit v1.2.3