Commit 4cfb5505 authored by rswindell's avatar rswindell
Browse files

Make sure -C and -Z @-code "format modifiers" (new term!) truncate long strings

just like -R and -L do.
parent 387e52d6
......@@ -97,9 +97,13 @@ int sbbs_t::show_atcode(const char *instr)
int left = (disp_len - vlen) / 2;
bprintf("%*s%-*s", left, "", disp_len - left, cp);
} else
bputs(cp);
bprintf("%.*s", disp_len, cp);
} else if(zero_padded) {
bprintf("%-.*s%s", disp_len - strlen(cp), "0000000000", cp);
int vlen = strlen(cp);
if(vlen < disp_len)
bprintf("%-.*s%s", disp_len - strlen(cp), "0000000000", cp);
else
bprintf("%.*s", disp_len, cp);
} else
bputs(cp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment