From 1fdda010eb5209ef5d7cb306815c47c10d84e14d Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 16 Apr 2024 08:24:55 -0700 Subject: [PATCH] Fixed issue with > as first character --- src/modal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modal.c b/src/modal.c index 6233bd9..63da5a8 100644 --- a/src/modal.c +++ b/src/modal.c @@ -138,7 +138,7 @@ parse_frag(char *s) { char c, *ss; while((c = *s) && c <= ' ') s++; - if(*s != ')' && *s != '<' && s[1] != '>') { + if(*s != ')' && !(*s == '<' && s[1] == '>')) { ss = walk(s); if(*s == '(') { s++; @@ -200,7 +200,7 @@ main(int argc, char **argv) if(argc < 2) return !printf("usage: modal [-v] source.modal\n"); if(argc < 3 && argv[1][0] == '-' && argv[1][1] == 'v') - return !printf("Modal Interpreter, 15 Apr 2024.\n"); + return !printf("Modal Interpreter, 16 Apr 2024.\n"); if(!(f = fopen(argv[1], "r"))) return !fprintf(stderr, "Invalid Modal file: %s.\n", argv[1]); while(fread(&c, 1, 1, f)) {