From 6a0d0638cdf510a9033fcd1e1a66daf636197a6f Mon Sep 17 00:00:00 2001 From: glenda Date: Sat, 22 Oct 2022 17:04:53 +0000 Subject: Fix previous commit --- apl9.h | 4 ++-- memory.c | 2 +- 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: -- cgit v1.2.3