From 11922297986fd568ad8de61d8d8b131e22bf0142 Mon Sep 17 00:00:00 2001 From: midipix Date: Nov 19 2016 22:24:43 +0000 Subject: pe_impl_strlen_utf16(): code maintenance. --- 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