diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-02 15:46:11 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-02 15:46:11 +0100 |
| commit | da3311fe108982773cdf8ea36924da4e90d60cc4 (patch) | |
| tree | ef86c1eb6d4d96f9b92a2b2227e5bdeded5a36a6 /src/main.c | |
| parent | e8799c69a8d85ef6709a39ee997768305b9f2b08 (diff) | |
| download | box64-da3311fe108982773cdf8ea36924da4e90d60cc4.tar.gz box64-da3311fe108982773cdf8ea36924da4e90d60cc4.zip | |
Another batch of printf/scanf format errors
Diffstat (limited to 'src/main.c')
| -rwxr-xr-x | src/main.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c index 7221ea9e..3dc3a829 100755 --- a/src/main.c +++ b/src/main.c @@ -144,7 +144,7 @@ void LoadLogEnv() if(p) { char* p2; start_cnt = strtoll(p, &p2, 10); - printf_log(LOG_INFO, "Will start trace only after %llu instructions\n", start_cnt); + printf_log(LOG_INFO, "Will start trace only after %lu instructions\n", start_cnt); } #endif // grab BOX64_TRACE_FILE envvar, and change %pid to actual pid is present in the name @@ -440,9 +440,9 @@ void setupTraceInit(box64context_t* context) if (strcmp(p, "1")==0) SetTraceEmu(0, 0); else if (strchr(p,'-')) { - if(sscanf(p, "%d-%d", &trace_start, &trace_end)!=2) { - if(sscanf(p, "0x%X-0x%X", &trace_start, &trace_end)!=2) - sscanf(p, "%x-%x", &trace_start, &trace_end); + if(sscanf(p, "%ld-%ld", &trace_start, &trace_end)!=2) { + if(sscanf(p, "0x%lX-0x%lX", &trace_start, &trace_end)!=2) + sscanf(p, "%lx-%lx", &trace_start, &trace_end); } if(trace_start || trace_end) SetTraceEmu(trace_start, trace_end); @@ -475,9 +475,9 @@ void setupTrace(box64context_t* context) if (strcmp(p, "1")==0) SetTraceEmu(0, 0); else if (strchr(p,'-')) { - if(sscanf(p, "%d-%d", &trace_start, &trace_end)!=2) { - if(sscanf(p, "0x%X-0x%X", &trace_start, &trace_end)!=2) - sscanf(p, "%x-%x", &trace_start, &trace_end); + if(sscanf(p, "%ld-%ld", &trace_start, &trace_end)!=2) { + if(sscanf(p, "0x%lX-0x%lX", &trace_start, &trace_end)!=2) + sscanf(p, "%lx-%lx", &trace_start, &trace_end); } if(trace_start || trace_end) { SetTraceEmu(trace_start, trace_end); |