Ticket #427: xapian-compact-fix1.patch

File xapian-compact-fix1.patch, 1.4 KB (added by Richard Boulton, 14 years ago)

Partial fix

  • bin/xapian-compact-brass.cc

     
    156156            size_t tmp = d - key.data();
    157157            if (!unpack_uint_preserving_sort(&d, e, &firstdid) || d != e)
    158158                throw Xapian::DatabaseCorruptError("Bad postlist key");
    159             key.erase(tmp);
     159            key.erase(tmp - 1);
    160160        }
    161161        firstdid += offset;
    162162        return true;
  • bin/xapian-compact-chert.cc

     
    156156            size_t tmp = d - key.data();
    157157            if (!unpack_uint_preserving_sort(&d, e, &firstdid) || d != e)
    158158                throw Xapian::DatabaseCorruptError("Bad postlist key");
    159             key.erase(tmp);
     159            key.erase(tmp - 1);
    160160        }
    161161        firstdid += offset;
    162162        return true;
  • bin/xapian-compact-flint.cc

     
    113113            size_t tmp = d - key.data();
    114114            if (!F_unpack_uint_preserving_sort(&d, e, &firstdid) || d != e)
    115115                throw Xapian::DatabaseCorruptError("Bad postlist key");
    116             key.erase(tmp);
     116            key.erase(tmp - 1);
    117117        }
    118118        firstdid += offset;
    119119        return true;