Tim Schumacher : dbgstr: Initialize hex list using an explicit char array.
Alexandre Julliard
julliard at winehq.org
Fri May 31 15:53:31 CDT 2019
Module: wine
Branch: master
Commit: 062db7222600e6b3eb73f9f638a2be1e181f870c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=062db7222600e6b3eb73f9f638a2be1e181f870c
Author: Tim Schumacher <timschumi at gmx.de>
Date: Sun May 19 23:19:19 2019 +0200
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 at gmx.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 aa4dc0d..1c312e9 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)";
More information about the wine-cvs
mailing list