mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 03:48:05 +11:00
VE: disallow buffer overflow during typing
When reaching the end of the buffer when typing in IBUF or FBUF, stop typing instead of overflowing.
This commit is contained in:
parent
394f962510
commit
e83d5073ba
4
blk/127
4
blk/127
@ -6,5 +6,5 @@
|
||||
: buftype ( buf ln -- )
|
||||
3 OVER AT-XY C< DUP 0xd = IF 2DROP DROP EXIT THEN
|
||||
( buf ln c ) 63 nspcs SWAP 4 SWAP AT-XY ( buf c )
|
||||
SWAP DUP _zbuf BEGIN ( c a )
|
||||
C!+ C< TUCK 0x0d = UNTIL ( c a ) C! ;
|
||||
SWAP DUP _zbuf C!+ DUP 63 + SWAP DO
|
||||
C< DUP 0x0d = IF LEAVE THEN i C! LOOP ;
|
||||
|
Loading…
Reference in New Issue
Block a user