From 062db7222600e6b3eb73f9f638a2be1e181f870c Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sun, 19 May 2019 23:19:19 +0200 Subject: [PATCH] dbgstr: Initialize hex list using an explicit char array. Some compilers (or rather, compiler settings) are unhappy with the terminating null-char, which is one byte beyond the 16 char limit. Initialize the array without the null char to circumvent this issue. Signed-off-by: Tim Schumacher Signed-off-by: Alexandre Julliard --- include/wine/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wine/debug.h b/include/wine/debug.h index aa4dc0d77e0..1c312e93221 100644 --- a/include/wine/debug.h +++ b/include/wine/debug.h @@ -220,7 +220,7 @@ static inline int __wine_dbg_cdecl wine_dbg_log( enum __wine_debug_class cls, static inline const char *wine_dbgstr_an( const char *str, int n ) { - static const char hex[16] = "0123456789abcdef"; + static const char hex[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; char buffer[300], *dst = buffer; if (!str) return "(null)"; @@ -262,7 +262,7 @@ static inline const char *wine_dbgstr_an( const char *str, int n ) static inline const char *wine_dbgstr_wn( const WCHAR *str, int n ) { - static const char hex[16] = "0123456789abcdef"; + static const char hex[16] = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; char buffer[300], *dst = buffer; if (!str) return "(null)";