Fixed #1757 Binary search - SWF files need to be sorted by file position

This commit is contained in:
Jindra Petřík
2022-11-17 20:23:37 +01:00
parent a41e3d13fa
commit 1e535a4472
5 changed files with 13 additions and 6 deletions

View File

@@ -22,6 +22,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
@@ -45,7 +47,7 @@ public class BinarySWFBundle implements SWFBundle {
@Override
public Set<String> getKeys() {
Set<String> ret = new HashSet<>();
Set<String> ret = new LinkedHashSet<>();
for (Long address : search.getAddresses()) {
ret.add("[" + address + "]");
}
@@ -71,7 +73,7 @@ public class BinarySWFBundle implements SWFBundle {
@Override
public Map<String, SeekableInputStream> getAll() {
Map<String, SeekableInputStream> ret = new HashMap<>();
Map<String, SeekableInputStream> ret = new LinkedHashMap<>();
for (String key : getKeys()) {
ret.put(key, getSWF(key));
}