Fixed a crash in the OAM tab

This commit is contained in:
Lior Halphon 2017-12-29 13:42:32 +02:00
parent 595bb563f9
commit d6236b87dd
1 changed files with 6 additions and 1 deletions

View File

@ -1171,7 +1171,12 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
else if (tableView == self.spritesTableView) { else if (tableView == self.spritesTableView) {
switch (columnIndex) { switch (columnIndex) {
case 0: case 0:
return [Document imageFromData:[NSData dataWithBytesNoCopy:oamInfo[row].image length:64 * 4] width:8 height:oamHeight scale:16.0/oamHeight]; return [Document imageFromData:[NSData dataWithBytesNoCopy:oamInfo[row].image
length:64 * 4
freeWhenDone:NO]
width:8
height:oamHeight
scale:16.0/oamHeight];
case 1: case 1:
return @((int)oamInfo[row].x - 8); return @((int)oamInfo[row].x - 8);
case 2: case 2: