peter-lawrey / Java-Chronicle

Java Indexed Record Chronicle
1.22k stars 193 forks source link

Is there a bug in "vanilla.java.chronicle.ByteString"? #5

Closed si262001 closed 12 years ago

si262001 commented 12 years ago

vanilla.java.chronicle.ByteString public void append(byte b) { int len = length(); if (len >= 255) throw new IndexOutOfBoundsException("Cannot append len=" + len); data[len] = b; data[0]++; }

I guess "data[len]" should be "date[len + 1] = b";

peter-lawrey commented 12 years ago

correct, as the first byte is the length. will fix.

peter-lawrey commented 12 years ago

fixed