mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +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/hash.h"
|
||||
#include "QF/progs.h"
|
||||
#include "QF/va.h"
|
||||
|
||||
typedef enum {
|
||||
str_free,
|
||||
|
@ -834,11 +835,11 @@ PR_Sprintf (progs_t *pr, dstring_t *result, const char *name,
|
|||
}
|
||||
|
||||
if (fmt_count != count) {
|
||||
printf ("%d %d", fmt_count, count);
|
||||
if (fmt_count > count)
|
||||
msg = "Not enough arguments for format string.";
|
||||
else
|
||||
msg = "Too many arguments for format string.";
|
||||
msg = va ("%s: %d %d", msg, fmt_count, count);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue