Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/haven/Resource.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public ImageReadException() {
}
}

public static BufferedImage readimage(InputStream fp) throws IOException {
public static BufferedImage readimage(final InputStream fp) throws IOException {
try {
/* This can crash if not privileged due to ImageIO
* creating tempfiles without doing that privileged
Expand Down Expand Up @@ -1480,6 +1480,11 @@ private void loadfromdecode(String full) throws Exception {
Constructor<? extends Layer> cons;

df = l[i].listFiles();
Arrays.sort(df, new Comparator<File>() {
public int compare(File a, File b) {
return a.getName().compareTo(b.getName());
}
});
switch (n) {
case "image":
case "tile": { /* .data + .png */
Expand Down