From 5249d7612d12e08eb7b7d89d6d7cbc1d28b0cd97 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Fri, 12 Apr 2024 10:07:42 -0700 Subject: [PATCH] Do not walk whitespace on create_rule --- src/modal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modal.c b/src/modal.c index 1099210..cf5c211 100644 --- a/src/modal.c +++ b/src/modal.c @@ -163,7 +163,6 @@ create_rule(Rule *r, int id, char *s) char c; r->id = id, s += 2; r->a = dict_, s = parse_frag(s), r->b = dict_, s = parse_frag(s); - while((c = *s) && c <= ' ') s++; return s; } @@ -178,6 +177,7 @@ rewrite(void) if(s[0] == '<' && s[1] == '>') { r = rules_++; s = create_rule(r, rules_ - rules - 1, s); + while((c = *s) && c <= ' ') s++; return commit_rule(r, s, 1); } if(s[0] == '?' && s[1] == '(') {