mirror of
https://github.com/GerbilSoft/rom-properties.git
synced 2025-06-19 03:55:43 -04:00
[rpcli] rpcli.cpp: Fix two errors introduced since switching over to vt.cpp.
- DoFile(): JSON errors should be printed to stdout, not stderr. - _tmain(): Remove an extra newline after the `default:` case's "skipping unknown switch" message.
This commit is contained in:
parent
25c5aa02cc
commit
d58918f101
@ -309,7 +309,7 @@ static void DoFile(const TCHAR *filename, bool json, const vector<ExtractParam>
|
||||
ConsolePrintNewline(&ci_stderr);
|
||||
fflush(stderr);
|
||||
if (json) {
|
||||
ConsolePrint(&ci_stderr, fmt::format(FSTR("{{\"error\":\"couldn't open file\",\"code\":{:d}}}\n"), file->lastError()));
|
||||
ConsolePrint(&ci_stdout, fmt::format(FSTR("{{\"error\":\"couldn't open file\",\"code\":{:d}}}\n"), file->lastError()));
|
||||
fflush(stdout);
|
||||
}
|
||||
return;
|
||||
@ -1031,7 +1031,6 @@ int RP_C_API _tmain(int argc, TCHAR *argv[])
|
||||
// FIXME: Unicode character on Windows.
|
||||
ConsolePrint(&ci_stderr,
|
||||
fmt::format(FRUN(C_("rpcli", "Warning: skipping unknown switch '{:c}'")), (char)argv[i][1]), true);
|
||||
ConsolePrintNewline(&ci_stderr);
|
||||
fflush(stderr);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user