From 8705ebebc6722137d7f269528e8e4071aaa366c8 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 14 Apr 2024 17:41:22 -0700 Subject: [PATCH] Fixed issue with ?~ register --- examples/hello.modal | 7 ++++--- src/modal.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/hello.modal b/examples/hello.modal index a5b4825..1ddb7ae 100644 --- a/examples/hello.modal +++ b/examples/hello.modal @@ -1,4 +1,5 @@ +<> (NAME) (Modal) +<> (?: print $) (?:) +<> ($ ?x) (?x $) -<> (listen ?~) (?~ done.) - -foo listen stdin bar \ No newline at end of file +$ (Welcome to NAME \nHave fun!\n\n) print \ No newline at end of file diff --git a/src/modal.c b/src/modal.c index ae25391..b162c96 100644 --- a/src/modal.c +++ b/src/modal.c @@ -50,7 +50,7 @@ put_reg(char r) *outp_++ = '?', *outp_++ = r; return; } - *ss = walk(s); + ss = walk(s); if(r == '*') { if(*s == '(') { /* special implode */ while(s < ss && (c = *s++))