optimize the disorder segments check

This commit is contained in:
lionsoul2014 2026-03-07 11:28:30 +08:00
parent fa16a4a45d
commit 29c7048f93
2 changed files with 6 additions and 3 deletions

View File

@ -174,8 +174,9 @@ func (m *Maker) loadSegments() error {
}
// check the order of the data segment
// if err := seg.RightBehind(last); err != nil {
if err := seg.After(last); err != nil {
if sorting {
// just keep going
} else if err := seg.After(last); err != nil {
// return err
// @Note: If the continuity is disrupted,
// we will sort all these segments later.

View File

@ -179,7 +179,9 @@ public class Maker {
throw new Exception("invalid ip segment("+version.name+" expected)");
}
if (last != null && !seg.after(last)) {
if (sorting) {
// just keep going
} else if (last != null && !seg.after(last)) {
// throw new Exception("discontinuous data segment: last.eip("
// + Util.ipToString(last.endIP)+")+1 != seg.sip("+ Util.ipToString(seg.startIP) + ", "+ seg.region +")");