int ch;
size_t n = 0;
- if(byte_vsnprintf(t, sizeof t, fmt, ap) < 0)
- strcpy(t, "[byte_vsnprintf failed]");
+ if(byte_vsnprintf(t, sizeof t, fmt, ap) < 0) {
+ strcpy(t, "[byte_vsnprintf failed: ");
+ strncat(t, fmt, sizeof t - strlen(t) - 1);
+ }
p = t;
while((ch = (unsigned char)*p++)) {
if(ch >= ' ' && ch <= 126) {