Browse files

don't mess up boolean caps in unibi_dump

  • Loading branch information...
1 parent 94019bd commit d6f0fe6eb2c17c397989106184c29d182aaecc87 @mauke committed Mar 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 unibilium.c
View
2 unibilium.c
@@ -576,7 +576,7 @@ size_t unibi_dump(const unibi_term *t, char *ptr, size_t n) {
}
for (i = 0; i < boollen; i++) {
- *p++ = t->bools[i / UCHAR_MAX] >> i % UCHAR_MAX & 1;
+ *p++ = t->bools[i / CHAR_BIT] >> i % CHAR_BIT & 1;
}
if ((namlen + boollen) % 2) {

0 comments on commit d6f0fe6

Please sign in to comment.