From 11922297986fd568ad8de61d8d8b131e22bf0142 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 19 Nov 2016 17:24:43 -0500 Subject: pe_impl_strlen_utf16(): code maintenance. --- src/internal/pe_impl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/internal/pe_impl.c b/src/internal/pe_impl.c index 3edbe16..2c4e5c9 100644 --- a/src/internal/pe_impl.c +++ b/src/internal/pe_impl.c @@ -26,16 +26,16 @@ int32_t pe_impl_strlen_ansi(const char * str) int32_t pe_impl_strlen_utf16(const wchar16_t * str) { - wchar16_t * wch; - wchar16_t * upper_bound; + const wchar16_t * wch; + const wchar16_t * upper_bound; - /* sanity check */ - upper_bound = (wchar16_t *)str + PE_STR_MAX_SYMBOL_LEN_ALLOWED; + upper_bound = str + PE_STR_MAX_SYMBOL_LEN_ALLOWED; - for (wch = (wchar16_t *)str; (wch < upper_bound) && (*wch); wch++); + for (wch=str; *wch && wch