Eric Pouech : winedbg: Use proper modifier when using sscanf for a DWORD_PTR.
Alexandre Julliard
julliard at winehq.org
Tue Oct 12 16:12:48 CDT 2021
Module: wine
Branch: master
Commit: ad8b107441246b8bc9b8dd50ec3121cc00e60313
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ad8b107441246b8bc9b8dd50ec3121cc00e60313
Author: Eric Pouech <eric.pouech at gmail.com>
Date: Tue Oct 12 18:10:52 2021 +0200
winedbg: Use proper modifier when using sscanf for a DWORD_PTR.
Regression introduced in 0ea9fe999c1ed3a8b645476d97d2e0221be17bb5.
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/winedbg/debug.l | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/programs/winedbg/debug.l b/programs/winedbg/debug.l
index b841048360f..875688f774f 100644
--- a/programs/winedbg/debug.l
+++ b/programs/winedbg/debug.l
@@ -154,11 +154,11 @@ STRING \"[^\n"]+\"
"[" { return *yytext; }
"]" { return *yytext; }
-"0x"{HEXDIGIT}+ { sscanf(yytext, "%lx", &dbg_lval.integer); return tNUM; }
-{DIGIT}+ { sscanf(yytext, "%ld", &dbg_lval.integer); return tNUM; }
+"0x"{HEXDIGIT}+ { sscanf(yytext, "%Ix", &dbg_lval.integer); return tNUM; }
+{DIGIT}+ { sscanf(yytext, "%Id", &dbg_lval.integer); return tNUM; }
"'\\''" { dbg_lval.integer = '\''; return tNUM;}
-"'\\0"{OCTDIGIT}*"'" { sscanf(yytext + 3, "%lo", &dbg_lval.integer); return tNUM;}
-"'\\x"{HEXDIGIT}+"'" { sscanf(yytext + 3, "%lx", &dbg_lval.integer); return tNUM;}
+"'\\0"{OCTDIGIT}*"'" { sscanf(yytext + 3, "%Io", &dbg_lval.integer); return tNUM;}
+"'\\x"{HEXDIGIT}+"'" { sscanf(yytext + 3, "%Ix", &dbg_lval.integer); return tNUM;}
"'\\"[a-z]"'" { dbg_lval.integer = yytext[2] - 'a'; return tNUM;}
"'"."'" { dbg_lval.integer = yytext[1]; return tNUM;}
More information about the wine-cvs
mailing list