mirror of
https://github.com/open-simh/simh.git
synced 2026-01-13 23:37:13 +00:00
SCP: Properly synchronize debug output data during duplicate line detection
This commit is contained in:
parent
74a640d04a
commit
d4de42b353
2
scp.c
2
scp.c
@ -12232,6 +12232,7 @@ if (sim_deb_switches & SWMASK ('F')) { /* filtering disabled? */
|
||||
_debug_fwrite (buf, len); /* output now. */
|
||||
return; /* done */
|
||||
}
|
||||
AIO_LOCK;
|
||||
if (debug_line_offset + len + 1 > debug_line_bufsize) {
|
||||
debug_line_bufsize += MAX(1024, debug_line_offset + len + 1);
|
||||
debug_line_buf = (char *)realloc (debug_line_buf, debug_line_bufsize);
|
||||
@ -12298,6 +12299,7 @@ while ((eol = strchr (debug_line_buf, '\n')) || flush) {
|
||||
memmove (debug_line_buf, eol + 1, debug_line_offset);
|
||||
debug_line_buf[debug_line_offset] = '\0';
|
||||
}
|
||||
AIO_UNLOCK;
|
||||
}
|
||||
|
||||
static void _sim_debug_write (const char *buf, size_t len)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user