hush not working in string parser with strings containing spaces

Bug #1614527 reported by Denis Bernard on 2016-08-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Retro
Undecided
Unassigned

Bug Description

hush is supposed to prevent Retro from echoing back the input, but it doesn't work when parsing strings with spaces. A quick example:

echo 'hush "one two" drop bye ' | retro

Gives this:

Retro 11.7.1

ok hush
ok two"
ok
ok

The fix is quite simple:

=== modified file 'image/stage2.rx'
--- image/stage2.rx 2016-06-20 10:34:45 +0000
+++ image/stage2.rx 2016-08-14 09:48:31 +0000
@@ -488,7 +488,7 @@
   : end? ( $-$ ) @end @1- '" == [ chop >pad -1 ] [ 0 ] if ;
   : noEat ( q- ) eatLeading? off do eatLeading? on ;
   : withPad ( q- ) 32 pad 1- ! &pad &tib :is noEat &tib :devector ;
- : get ( -c ) getc dup putc ;
+ : get ( -c ) getc (echo) ;
 ---reveal---
   : __" ( "-a )
     dup withLength + !end

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers