diff options
| author | Tyge Løvset <[email protected]> | 2020-10-21 09:02:35 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-10-21 09:02:35 +0200 |
| commit | d0d004c8154a40fdcfd5a86b04bc5c610dbcc386 (patch) | |
| tree | 6c4d7b2756db55b61df2347cdb4c09226e70547a | |
| parent | 8014ab4e48e7cf41377634742830f1a7ca5b7b7d (diff) | |
| download | STC-modified-d0d004c8154a40fdcfd5a86b04bc5c610dbcc386.tar.gz STC-modified-d0d004c8154a40fdcfd5a86b04bc5c610dbcc386.zip | |
Added support for regular % formatting as well.
| -rw-r--r-- | stc/cfmt.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -147,6 +147,10 @@ _cfmt_conv(const char *fmt, ...) { va_start(args, fmt);
do {
switch ((ch = *fmt)) {
+ case '%':
+ if (fmt[1] == '%') *p++ = *fmt++;
+ else va_arg(args, char *);
+ break;
case '}':
if (fmt[1] == '}') ++fmt;
break;
|
