Fixed issue with > as first character

This commit is contained in:
Devine Lu Linvega 2024-04-16 08:24:55 -07:00
parent b61172d52e
commit 1fdda010eb
1 changed files with 2 additions and 2 deletions

View File

@ -138,7 +138,7 @@ parse_frag(char *s)
{ {
char c, *ss; char c, *ss;
while((c = *s) && c <= ' ') s++; while((c = *s) && c <= ' ') s++;
if(*s != ')' && *s != '<' && s[1] != '>') { if(*s != ')' && !(*s == '<' && s[1] == '>')) {
ss = walk(s); ss = walk(s);
if(*s == '(') { if(*s == '(') {
s++; s++;
@ -200,7 +200,7 @@ main(int argc, char **argv)
if(argc < 2) if(argc < 2)
return !printf("usage: modal [-v] source.modal\n"); return !printf("usage: modal [-v] source.modal\n");
if(argc < 3 && argv[1][0] == '-' && argv[1][1] == 'v') 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"))) if(!(f = fopen(argv[1], "r")))
return !fprintf(stderr, "Invalid Modal file: %s.\n", argv[1]); return !fprintf(stderr, "Invalid Modal file: %s.\n", argv[1]);
while(fread(&c, 1, 1, f)) { while(fread(&c, 1, 1, f)) {