summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-07-06 04:30:11 -0400
committermidipix <writeonce@midipix.org>2016-07-06 04:41:05 -0400
commit486bdad41ef324887ae42c5da68f46ea34b03c82 (patch)
tree0bba95772f4773a0da116f22e52c044aa7db7832 /src
parent968b439faca6a69713a004e954c0b1915a36d879 (diff)
downloadpemagine-486bdad41ef324887ae42c5da68f46ea34b03c82.tar.bz2
pemagine-486bdad41ef324887ae42c5da68f46ea34b03c82.tar.xz
pe_impl_strlen_utf16(): fix calculation regression caused by commit 239ee42e.
Diffstat (limited to 'src')
-rw-r--r--src/internal/pe_impl.c2
1 files changed, 1 insertions, 1 deletions
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;
}