Pixel out of bounds checking

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2 3 years ago
parent 9c118ff30c
commit 99d410f43e
  1. BIN
      bin/SigShare.jar
  2. BIN
      bin/screenshot.jpg
  3. 0
      bin/screenshot_out.jpg
  4. BIN
      bin/screenshot_part.jpg
  5. 4
      src/sig/SigShare.java

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 B

@ -314,7 +314,9 @@ public class SigShare {
for (int y=(regionInfo/REGION_X_COUNT)*REGION_HEIGHT;y<(regionInfo/REGION_X_COUNT)*REGION_HEIGHT+REGION_HEIGHT;y++) {
int xx=0;
for (int x=(regionInfo%REGION_X_COUNT)*REGION_WIDTH;x<(regionInfo%REGION_X_COUNT)*REGION_WIDTH+REGION_WIDTH;x++) {
Panel.pixel[y*SCREEN_WIDTH+x]=i.getRGB(xx,yy);
if (xx<i.getWidth()&&yy<i.getHeight()) {
Panel.pixel[y*SCREEN_WIDTH+x]=i.getRGB(xx,yy);
}
xx++;
}
yy++;

Loading…
Cancel
Save