From 70a158d3da65a920f313eeab90019d19d1784e71 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 4 Apr 2024 19:40:16 -0700 Subject: [PATCH] Faster walk --- src/modal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modal.c b/src/modal.c index c10fe55..ed261dd 100644 --- a/src/modal.c +++ b/src/modal.c @@ -16,8 +16,8 @@ static char *regs[0x100]; static char * walk(char *s) { - int depth = 0; char c; + int depth = 0; if(s[0] == '(') { while((c = *s++)) { if(c == '(') depth++; @@ -25,8 +25,8 @@ walk(char *s) if(!depth) return s; } } - while((c = *s++)) - if(spacer(c)) return s - 1; + while(!spacer(s[0]) && (c = *s++)) + ; return s; }