GUI: Replace ConsoleDialog use of vsnprintf by Common::String::vformat()
This commit is contained in:
parent
ce4c98d757
commit
9796890cce
1 changed files with 4 additions and 5 deletions
|
@ -665,12 +665,11 @@ int ConsoleDialog::printFormat(int dummy, const char *format, ...) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int ConsoleDialog::vprintFormat(int dummy, const char *format, va_list argptr) {
|
int ConsoleDialog::vprintFormat(int dummy, const char *format, va_list argptr) {
|
||||||
char buf[2048];
|
Common::String buffer = Common::String::vformat(format, argptr);
|
||||||
|
|
||||||
int count = vsnprintf(buf, sizeof(buf), format, argptr);
|
print(buffer.c_str());
|
||||||
buf[sizeof(buf)-1] = 0; // ensure termination
|
|
||||||
print(buf);
|
return buffer.size();
|
||||||
return count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleDialog::printChar(int c) {
|
void ConsoleDialog::printChar(int c) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue