From 44b2ba7fdbfffe928b5d26baa0733ff019e6740c Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Fri, 7 Mar 2008 19:23:46 +0000 Subject: Fix bug caused by sign extension when reading single-byte row numbers; fix some bugs in new text index generation code git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@252 f203690c-595d-4dc9-a70b-905162fa7fd2 --- src/java/com/healthmarketscience/jackcess/Index.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/java/com/healthmarketscience/jackcess/Index.java') diff --git a/src/java/com/healthmarketscience/jackcess/Index.java b/src/java/com/healthmarketscience/jackcess/Index.java index 2a46959..eb57194 100644 --- a/src/java/com/healthmarketscience/jackcess/Index.java +++ b/src/java/com/healthmarketscience/jackcess/Index.java @@ -948,6 +948,7 @@ public class Index implements Comparable { ++charOffset; } tmpBout.write(extraCodes._extraCodes); + ++charOffset; } } @@ -988,7 +989,7 @@ public class Index implements Comparable { } // write end extra text - tmpBout.write(END_EXTRA_TEXT); + bout.write(END_EXTRA_TEXT); } /** @@ -1295,7 +1296,8 @@ public class Index implements Comparable { // read the rowId int page = ByteUtil.get3ByteInt(buffer, ByteOrder.BIG_ENDIAN); - int row = buffer.get(); + int row = ByteUtil.toUnsignedInt(buffer.get()); + _rowId = new RowId(page, row); _type = EntryType.NORMAL; } -- cgit v1.2.3