diff options
| author | Tyge Løvset <[email protected]> | 2020-10-27 11:52:51 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-10-27 11:52:51 +0100 |
| commit | 6bb27d7054aee5c9e99166d6f11d0d7e7227cfe1 (patch) | |
| tree | 68394b8542724851c87d063d0d43407537c8278f | |
| parent | 1fce4b649b011598e08a4bd5af36c50de78dcd70 (diff) | |
| download | STC-modified-6bb27d7054aee5c9e99166d6f11d0d7e7227cfe1.tar.gz STC-modified-6bb27d7054aee5c9e99166d6f11d0d7e7227cfe1.zip | |
Fixed final minor error.
| -rw-r--r-- | stc/cfmt.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -37,7 +37,7 @@ int main() { c_print(1, "Date: {} {}\n", c_ftime("%Y-%m-%d %X %Z", tm), test);
c_print(1, "Color: ({} {} {}), {}\n", r, g, b, flag);
c_print(1, "{:10}, {:10}, {:.2f}\n", 42, 43, 3.141592267);
- c_print(stdout, "{:10} {:10} {:10}\n", z, z, w);
+ c_print(stdout, "{:>10} {:>10} {:>10}\n", z, z, w);
c_print(stderr, "100%: {:>} {:.*} {}\n", string.str, 4, pi, x);
c_print(&string, "Precision: {} {:.16} {}", string.str, pi, x);
c_print(1, "{}\nvector: ({}, {}, {})\n", string.str, 3.2, 3.3, 4.2/3.2);
@@ -215,7 +215,7 @@ _cfmt_conv(int nargs, const char *fmt, ...) { done:
if (!strchr("csdioxXufFeEaAgGnp", fmt[-1]))
while (*arg) *p++ = *arg++;
- else if (!align && strchr("cs", p[-1]))
+ if (!align && strchr("cs", p[-1]))
memmove(p0+1, p0, p-p0), *p0 = '-', ++p;
fmt += *fmt == '}';
continue;
|
