aboutsummaryrefslogtreecommitdiff
path: root/src/build.c
diff options
context:
space:
mode:
authorMarvin Borner2023-05-21 20:29:35 +0200
committerMarvin Borner2023-05-21 20:29:35 +0200
commit1c9a2f192dad4847fb0205fa33d4caa17f7e53a8 (patch)
treea8a3bf2b882799445d29a3352ab6cdb4a446b1c0 /src/build.c
parent05d9c29717f7ae31dfad9230d469af0fa7f0c761 (diff)
Generalized hash function
I also tried murmur64 but I don't see any reason for actually switching
Diffstat (limited to 'src/build.c')
-rw-r--r--src/build.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/build.c b/src/build.c
index d90b714..4c26e69 100644
--- a/src/build.c
+++ b/src/build.c
@@ -46,7 +46,7 @@ static void rec_write_bblc(struct tree *tree, FILE *file, char *byte, int *bit)
write_bit(1, file, byte, bit);
write_bit(1, file, byte, bit);
- int ref = tree->u.ref.table_index;
+ size_t ref = tree->u.ref.table_index;
int bits = 0;
// write index length bit prefixes
@@ -58,11 +58,11 @@ static void rec_write_bblc(struct tree *tree, FILE *file, char *byte, int *bit)
bits = 16;
write_bit(0, file, byte, bit);
write_bit(1, file, byte, bit);
- } else if (ref < 2 << 31) {
+ } else if (ref < 2l << 31) {
bits = 32;
write_bit(1, file, byte, bit);
write_bit(0, file, byte, bit);
- } else if (ref < 2 << 63) {
+ } else {
bits = 64; // i wanna see that program lol
write_bit(1, file, byte, bit);
write_bit(1, file, byte, bit);