From abdecf3fe36a671e2e2e5061cff1504d23aa9dc1 Mon Sep 17 00:00:00 2001 From: James Bowes Date: Thu, 25 Oct 2012 11:51:37 -0300 Subject: [PATCH] Fix division for byte count node size --- thing.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thing.rb b/thing.rb index 67f7093..2dbd548 100755 --- a/thing.rb +++ b/thing.rb @@ -389,7 +389,7 @@ if $0 == __FILE__ file.write([node_count].pack("C")) else bits = Math.log(node_count, 2).ceil - bytes = (bits / 8).ceil + bytes = (bits / 8.0).ceil if bytes == 3 # must write this as a 32-bit int bytes = 4