mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
bare printf doesn't give very desirable results
This commit is contained in:
parent
b2b1cf89f4
commit
3f3ec6404d
1 changed files with 2 additions and 1 deletions
|
@ -45,6 +45,7 @@ static __attribute__ ((used)) const char rcsid[] =
|
||||||
#include "QF/dstring.h"
|
#include "QF/dstring.h"
|
||||||
#include "QF/hash.h"
|
#include "QF/hash.h"
|
||||||
#include "QF/progs.h"
|
#include "QF/progs.h"
|
||||||
|
#include "QF/va.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
str_free,
|
str_free,
|
||||||
|
@ -834,11 +835,11 @@ PR_Sprintf (progs_t *pr, dstring_t *result, const char *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fmt_count != count) {
|
if (fmt_count != count) {
|
||||||
printf ("%d %d", fmt_count, count);
|
|
||||||
if (fmt_count > count)
|
if (fmt_count > count)
|
||||||
msg = "Not enough arguments for format string.";
|
msg = "Not enough arguments for format string.";
|
||||||
else
|
else
|
||||||
msg = "Too many arguments for format string.";
|
msg = "Too many arguments for format string.";
|
||||||
|
msg = va ("%s: %d %d", msg, fmt_count, count);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue