diff options
| author | Tyge Løvset <[email protected]> | 2020-10-22 10:49:03 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-10-22 10:49:03 +0200 |
| commit | 4790979500653f897052e5abe7110477d0a4207f (patch) | |
| tree | 98587a5de75db1f4dccea2b1ebf13f13d31d7bb5 | |
| parent | c7d76e742e66895adf4384cdf48fde258eae171f (diff) | |
| download | STC-modified-4790979500653f897052e5abe7110477d0a4207f.tar.gz STC-modified-4790979500653f897052e5abe7110477d0a4207f.zip | |
A minor fix.
| -rw-r--r-- | stc/cfmt.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -162,7 +162,7 @@ _cfmt_conv(int nargs, const char *fmt, ...) { *p++ = *fmt++;
if (*fmt == '%') break;
if (++n > nargs) {
- if (n-1 == nargs) fprintf(stderr, "error: c_printf(): missing argument(s)\n");
+ fprintf(stderr, "error: c_printf(): missing argument\n");
break;
}
f = va_arg(args, char *);
@@ -181,7 +181,7 @@ _cfmt_conv(int nargs, const char *fmt, ...) { if (fmt[1] == '{') { ++fmt; break; }
if (fmt[1] == ':' || fmt[1] == '}') {
if (++n > nargs) {
- if (n-1 == nargs) fprintf(stdout, "error: c_printf(): missing argument(s)\n");
+ fprintf(stderr, "error: c_printf(): missing argument\n");
break;
}
*p++ = '%';
|
