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 timschumi@gmx.de --- 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)"; -- 2.21.0