Commit 361bfb67 authored by gwvo's avatar gwvo

Merge pull request #189 from pjulien/188

Issue #188
parents 3f96eead d322eec3
...@@ -45,7 +45,7 @@ public class Table { ...@@ -45,7 +45,7 @@ public class Table {
protected String __string(int offset) { protected String __string(int offset) {
offset += bb.getInt(offset); offset += bb.getInt(offset);
if (bb.hasArray()) { if (bb.hasArray()) {
return new String(bb.array(), offset + SIZEOF_INT, bb.getInt(offset), FlatBufferBuilder.utf8charset); return new String(bb.array(), bb.arrayOffset() + offset + SIZEOF_INT, bb.getInt(offset), FlatBufferBuilder.utf8charset);
} else { } else {
// We can't access .array(), since the ByteBuffer is read-only, // We can't access .array(), since the ByteBuffer is read-only,
// off-heap or a memory map // off-heap or a memory map
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment