From c6016cd4290f46e3852f8d232f9e8c58a50d7b7b Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sat, 6 Jun 2020 21:59:22 -0400 Subject: [PATCH] VE: fix buffer overflow with 'f' and make 'H' and 'L' affect 'f' --- blk/127 | 4 ++-- blk/129 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blk/127 b/blk/127 index 3d4ad1d..0896f6b 100644 --- a/blk/127 +++ b/blk/127 @@ -10,5 +10,5 @@ : $E E contents ; : $X acc@ X contents ; : $h -1 cmv ; : $l 1 cmv ; : $k -64 cmv ; : $j 64 cmv ; -: $H 0acc EDPOS @ 0x3c0 AND EDPOS ! ; -: $L 0acc EDPOS @ 0x3f OR EDPOS ! ; +: $H 0acc EDPOS @ 0x3c0 AND pos! ; +: $L 0acc EDPOS @ 0x3f OR pos! ; diff --git a/blk/129 b/blk/129 index af7af36..f9b9546 100644 --- a/blk/129 +++ b/blk/129 @@ -1,6 +1,6 @@ : $f EDPOS @ PREVPOS @ 2DUP = IF 2DROP EXIT THEN 2DUP > IF DUP pos! SWAP THEN - ( p1 p2, p1 < p2 ) OVER - ( pos len ) FBUF _zbuf + ( p1 p2, p1 < p2 ) OVER - 64 MIN ( pos len ) FBUF _zbuf SWAP _cpos FBUF ( len src dst ) ROT MOVE ; : $R ( replace mode ) mode! 'R' EMIT