summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
Diffstat (limited to '6')
-rw-r--r--6/genp9.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/6/genp9.c b/6/genp9.c
index b1edb80..32d9e8b 100644
--- a/6/genp9.c
+++ b/6/genp9.c
@@ -297,7 +297,7 @@ static size_t encodemin(FILE *fd, uvlong val, size_t off, char *lbl)
n = 0;
shift = 8 - i;
b = ~0ull << (shift + 1);
- b |= val & ((1 << (8 - shift)) - 1);
+ b |= val & ~(~0ull << shift);
fprintf(fd, "\tDATA %s+%zd(SB)/1,$%u\n", lbl, off, b);
val >>= shift;
while (val != 0) {