Commit Diff
- Commit:
3d08a066b167b60691949fe89a7a67ef29df39cb
- From:
- Marc Simpson <marc@0branch.com>
- Via:
- Dan Cross <crossd@gmail.com>
- Date:
- Message:
- ed: replace magic number (077776, i.e. 32766) with NBLK-1. (#300) Temp file size is now declared in an enum; changing it from the default introduces a subtle bug in putline(), which expects it to be 32767. Mask with NBLK-1 instead.
- Actions:
- Patch | Tree
--- src/cmd/ed.c +++ src/cmd/ed.c @@ -1050,7 +1050,7 @@ putline(void) } } nl = tline; - tline += ((lp-linebuf) + 03) & 077776; + tline += ((lp-linebuf) + 03) & (NBLK-1); return nl; }