From 6135d8e6925883dd9d4bd6f836bf469bf2ee2b3e Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 25 Apr 2015 01:55:15 +0300 Subject: [PATCH] fix tests reg autoclear was dropped as it could allow some serious problems to be missed --- tests/reg_call3.asm | 1 + tools/translate.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/reg_call3.asm b/tests/reg_call3.asm index 1438637..f5d7d06 100644 --- a/tests/reg_call3.asm +++ b/tests/reg_call3.asm @@ -4,6 +4,7 @@ _text segment para public 'CODE' use32 +; sctattr: clear_regmask=0c sub_test proc near xor ebx, ebx push 1 diff --git a/tools/translate.c b/tools/translate.c index 726da70..0db05e8 100644 --- a/tools/translate.c +++ b/tools/translate.c @@ -7973,7 +7973,7 @@ int main(int argc, char *argv[]) &g_stack_clear_len, &j); else if (i == 1) // clear_regmask= - ret = sscanf(p, "=%d%n", &g_regmask_init, &j) + 1; + ret = sscanf(p, "=%x%n", &g_regmask_init, &j) + 1; if (ret < 2) { anote("unparsed attr value: %s\n", p); break; -- 2.39.5