Skip to content

Commit

Permalink
Version 1.4.4 cont.
Browse files Browse the repository at this point in the history
Changelog:
* Fixed a bug where the progam would fail to load files saved with a specific version of APE
  • Loading branch information
MajesticWaffle committed Dec 26, 2020
1 parent 16d5513 commit 9c2d274
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/com/thiccindustries/APE2/FileManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public static APFile loadPixelArrayFromFile(String filePath) {
fileLoaded.palette[i / 3] = new Color(rawPixelData[i + 16] & 0xff, rawPixelData[i + 16 + 1] & 0xff, rawPixelData[i + 16 + 2] & 0xff);
}

if (rawPixelData.length == 576) {
if (rawPixelData.length == 576 || rawPixelData.length == 593) {
System.out.println("Loading A.P.E / AP2 file.");

for(int i = 1; i < 7; i++){
Expand Down Expand Up @@ -288,7 +288,7 @@ public static APFile loadPixelArrayFromFile(String filePath) {
}

}
if(rawPixelData.length > 576 && rawPixelData.length != 4180){
if(rawPixelData.length > 576 && rawPixelData.length != 4180 && rawPixelData.length != 593){

boolean[] activeLayers = new boolean[7];
int activeLayerTotal = 0;
Expand Down

0 comments on commit 9c2d274

Please sign in to comment.