Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
0.21.1
Browse files Browse the repository at this point in the history
Fixed a logictest incorrect "Syntax Error" or "Type mismatch" bug
  • Loading branch information
PQCraft authored Aug 31, 2021
1 parent 8fa2efd commit ab65125
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clibasic.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

// Base defines

char VER[] = "0.21";
char VER[] = "0.21.1";

#if defined(__linux__)
char OSVER[] = "Linux";
Expand Down Expand Up @@ -2324,20 +2324,25 @@ uint8_t logictest(char* inbuf) {
}
}
copyStrSnip(inbuf, i, j, ltbuf);
//printf("{%s} {%s} [%d, %d] [%d, %d]\n", inbuf, ltbuf, i, j, logicAct, logicActOld);
switch (logicActOld) {
case 1:
//printf("OR: {%s}\n", ltbuf);
if ((ret = logictestexpr(ltbuf)) == 255) {return 255;}
out |= ret;
break;
case 2:
//printf("AND: {%s}\n", ltbuf);
if ((ret = logictestexpr(ltbuf)) == 255) {return 255;}
out &= ret;
break;
default:
//printf("NONE: {%s}\n", ltbuf);
out = logictestexpr(ltbuf);
break;
}
i = ++j;
if (!inbuf[i + 1]) break;
logicActOld = logicAct;
}
return out;
Expand Down

0 comments on commit ab65125

Please sign in to comment.