commit 38905108582755367b12c9dab1d20f71b66305d1 Author: Bertram Felgenhauer Date: Wed Dec 10 04:39:08 2025 +0100 cdb fixes - in queue(), wrap indices in the current process queue - in print_registers(), print the queue prefix even when it wrapped around to the end of the task queue buffer diff --git a/src/cdb.c b/src/cdb.c index 40f7ecc..72ae391 100644 --- a/src/cdb.c +++ b/src/cdb.c @@ -1008,6 +1008,7 @@ ADDR_T queue(index) int index; { + index = (index % QW->tasks + QW->tasks) % QW->tasks; if (!index) return progCnt; else @@ -1895,7 +1896,7 @@ print_registers() thisProc = W->taskTail + (totaltask - nPast); else thisProc = W->taskTail - nPast; - for (; thisProc < W->taskTail;) { + for (count = nPast; --count >= 0; ) { sprintf(outs, "%d ", *thisProc); cdb_fputs(outs, COND); #ifdef DOS16