Fixed output of debug data when a debug message doesn't contain a newline
This commit is contained in:
parent
ed7f3be258
commit
df93215acf
1 changed files with 8 additions and 2 deletions
10
scp.c
10
scp.c
|
@ -6672,8 +6672,14 @@ if (sim_deb && (dptr->dctrl & dbits)) {
|
||||||
j = i + 1;
|
j = i + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i > j)
|
if (i > j) {
|
||||||
fwrite (&buf[j], 1, i-j, sim_deb);
|
if (debug_unterm)
|
||||||
|
fprintf (sim_deb, "%.*s", i-j, &buf[j]);
|
||||||
|
else /* print prefix when required */
|
||||||
|
fprintf (sim_deb, "DBG(%.0f)%s> %s %s: %.*s", sim_gtime(),
|
||||||
|
AIO_MAIN_THREAD ? "" : "+",
|
||||||
|
dptr->name, debug_type, i-j, &buf[j]);
|
||||||
|
}
|
||||||
|
|
||||||
/* Set unterminated flag for next time */
|
/* Set unterminated flag for next time */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue