Pixel out of bounds checking
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
9c118ff30c
commit
99d410f43e
BIN
bin/SigShare.jar
BIN
bin/SigShare.jar
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++) {
|
for (int y=(regionInfo/REGION_X_COUNT)*REGION_HEIGHT;y<(regionInfo/REGION_X_COUNT)*REGION_HEIGHT+REGION_HEIGHT;y++) {
|
||||||
int xx=0;
|
int xx=0;
|
||||||
for (int x=(regionInfo%REGION_X_COUNT)*REGION_WIDTH;x<(regionInfo%REGION_X_COUNT)*REGION_WIDTH+REGION_WIDTH;x++) {
|
for (int x=(regionInfo%REGION_X_COUNT)*REGION_WIDTH;x<(regionInfo%REGION_X_COUNT)*REGION_WIDTH+REGION_WIDTH;x++) {
|
||||||
|
if (xx<i.getWidth()&&yy<i.getHeight()) {
|
||||||
Panel.pixel[y*SCREEN_WIDTH+x]=i.getRGB(xx,yy);
|
Panel.pixel[y*SCREEN_WIDTH+x]=i.getRGB(xx,yy);
|
||||||
|
}
|
||||||
xx++;
|
xx++;
|
||||||
}
|
}
|
||||||
yy++;
|
yy++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user