lishunli / kryo

Automatically exported from code.google.com/p/kryo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Varint is broken in UnsafeOutput in 2.22-SNAPSHOT

GoogleCodeExporter opened this issue · comments


    @Test
    public void test() {
        final int value = 39117;
        final Output out = new UnsafeOutput(1024);
        out.writeVarInt(value, true);
        final Input in = new UnsafeInput(out.toBytes());
        final int actualValue = in.readVarInt(true);
        assertEquals(value, actualValue);
    }

java.lang.AssertionError: 
Expected :39117
Actual   :55501

Original issue reported on code.google.com by denis.af...@gmail.com on 5 Aug 2013 at 6:46

And it works with "Output".

Original comment by denis.af...@gmail.com on 5 Aug 2013 at 6:48

  • Added labels: ****
  • Removed labels: ****
Fixed in  trunk.

Original comment by romixlev on 5 Aug 2013 at 10:59

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****