History

fix if prim

Sigrid Haflínudóttir committed 6 years ago

Commit 3b7c02e1 parent e4bfb661 file · +2 −1Browse files

Unified · Split

aa.c+2−1
@@ -8,6 +8,7 @@ · 7 unmodified lines
88 #define TAG(x) ( (x)->car.c )
99 #define ISNIL(x) ( (x) == &Nil )
1010 #define ISTRUE(x) ( (x) == &True )
11+#define ISFALSE(x) ( (x) == &False )
1112 #define TYPE(x) ( TAG(x) & 0x1 ? TAG(x) >> 2 : AA_TPAIR )
1213 #define SETTYPE(x,t) ( TAG(x) = (t) << 2 | 1 )
1314 #define NUMBER(x) ( (x)->cdr.n )
@@ -775,7 +776,7 @@ eval(aaContext *ctx, aaObject *obj, aaObject *env, aaObject **newenv) · 761 unmodified lines
775776 case P_IF:
776777 while(!ISNIL(arg)){
777778 va = evalarg();
778− if(!ISNIL(va)){
779+ if(!ISFALSE(va)){
779780 res = ISNIL(arg) ? va : evalarg();
780781 break;
781782 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t