Skip to content

Commit

Permalink
fix ArrayIndexOutOfBoundsException
Browse files Browse the repository at this point in the history
  • Loading branch information
Dituon committed Feb 27, 2023
1 parent f452417 commit f2c991a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/moe/dituon/petpet/share/AvatarModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,8 @@ private void buildImage() {
if (resampling && posType == AvatarPosType.ZOOM) {
imageList = new ArrayList<>(imageList);
for (short i = 0; i < imageList.size(); i++) {
imageList.set(
i,
Scalr.resize(imageList.get(i), Scalr.Method.AUTOMATIC, pos[i][2], pos[i][3])
);
var img = Scalr.resize(imageList.get(i), Scalr.Method.AUTOMATIC, getPos(i)[2], getPos(i)[3]);
imageList.set(i, img);
}
}
}
Expand Down

0 comments on commit f2c991a

Please sign in to comment.