]> source.dussan.org Git - jackcess.git/commitdiff
swap overflow/deleted flag logic
authorJames Ahlborn <jtahlborn@yahoo.com>
Thu, 3 Aug 2006 12:45:54 +0000 (12:45 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Thu, 3 Aug 2006 12:45:54 +0000 (12:45 +0000)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@81 f203690c-595d-4dc9-a70b-905162fa7fd2

src/java/com/healthmarketscience/jackcess/Table.java

index 8cbd796d3607865b745b88ee9ff85ee2e6f5f196..854a6b490dd400282ef18cfc7499b1d985568edd 100644 (file)
@@ -311,10 +311,16 @@ public class Table {
         _currentRowInPage * _format.SIZE_ROW_LOCATION);
     _currentRowInPage++;
     _rowsLeftOnPage--;
-    if (_rowStart < 0) {
+
+    // FIXME, mdbtools seems to be confused as to which flag is which, this
+    // code follows the actual code, which disagrees with the HACKING doc
+    boolean deletedRow = ((_rowStart & 0x4000) != 0);
+    boolean overflowRow = ((_rowStart & 0x8000) != 0);
+    
+    if (deletedRow) {
       // Deleted row.  Skip.
       return positionAtNextRow();
-    } else if ((_rowStart & 0x4000) > 0) {
+    } else if (overflowRow) {
       // Overflow page.
       // FIXME - Currently skipping this.  Need to figure out how to read it.
       _buffer.position(_rowStart - 0x4000);