diff --git a/sys/src/9/port/devproc.c b/sys/src/9/port/devproc.c index b2509ddcb..4692eafda 100644 --- a/sys/src/9/port/devproc.c +++ b/sys/src/9/port/devproc.c @@ -812,7 +812,7 @@ writewatchpt(Proc *pr, char *buf, int nbuf, uvlong offset) } if(nwp0 > 0) memmove(wp, pr->watchpt, sizeof(Watchpt) * nwp0); - for(wq = wp + nwp0;;){ + for(wq = wp + nwp0; wq < wp + nwp0+nwp;){ q = memchr(p, '\n', e - p); if(q == nil) break;