aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ed.c
diff options
context:
space:
mode:
authorMarc Simpson <marc@0branch.com>2019-12-08 17:19:17 -0800
committerDan Cross <crossd@gmail.com>2019-12-08 20:19:17 -0500
commit3d08a066b167b60691949fe89a7a67ef29df39cb (patch)
tree2d2af41c18517113faf5434baadf9099f1afb94c /src/cmd/ed.c
parent46606276c3fe20fa81597cf87378e18f7baf88a7 (diff)
downloadplan9port-3d08a066b167b60691949fe89a7a67ef29df39cb.tar.gz
plan9port-3d08a066b167b60691949fe89a7a67ef29df39cb.tar.bz2
plan9port-3d08a066b167b60691949fe89a7a67ef29df39cb.zip
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.
Diffstat (limited to 'src/cmd/ed.c')
-rw-r--r--src/cmd/ed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/ed.c b/src/cmd/ed.c
index 788b35be..90bb6315 100644
--- a/src/cmd/ed.c
+++ b/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;
}