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 <timschumi@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Tim Schumacher 2019-05-19 23:19:19 +02:00 committed by Alexandre Julliard
parent fc4ef8692e
commit 062db72226
1 changed files with 2 additions and 2 deletions

View File

@ -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)";