summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglenda <glenda@9front>2022-10-22 17:04:53 +0000
committerglenda <glenda@9front>2022-10-22 17:04:53 +0000
commit6a0d0638cdf510a9033fcd1e1a66daf636197a6f (patch)
tree05047aaa3afbf902d013a5a7d4531ab21aaf2b8c
parenta82186dab48c234c507693b166acd7c13433864a (diff)
Fix previous commit
-rw-r--r--apl9.h4
-rw-r--r--memory.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/apl9.h b/apl9.h
index 08c4d00..54d827b 100644
--- a/apl9.h
+++ b/apl9.h
@@ -84,8 +84,8 @@ struct Mixed
};
#define GetRank(a) ((u8int)((a->info & 0x000000000000000F) >> 0))
-#define GetType(a) ((u8int)((a->info & 0x000000000000000F) >> 4))
-#define GetStrand(a) ((u8int)((a->info & 0x0000000000000010) >> 8))
+#define GetType(a) ((u8int)((a->info & 0x00000000000000F0) >> 4))
+#define GetStrand(a) ((u8int)((a->info & 0x0000000000000100) >> 8))
#define SetRank(a,v) (a->info ^= ((u64int)(GetRank(a)^v) << 0))
#define SetType(a,v) (a->info ^= ((u64int)(GetType(a)^v) << 4))
#define SetStrand(a,v) (a->info ^= ((u64int)(GetStrand(a)^v) << 8))
diff --git a/memory.c b/memory.c
index 9f333e6..1b2498c 100644
--- a/memory.c
+++ b/memory.c
@@ -105,7 +105,7 @@ freedatum(Datum *d)
if(d == nil)
return;
- if(decref(d)){
+ if(decref(d) == 0){
/* print("FREE DATUM: %S\n", ppdatum(d)); */
switch(d->tag){
case ArrayTag: