Skip to content

Commit 00023c0

Browse files
committed
Limit read length on GC Loader
1 parent 47c6e0d commit 00023c0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libogc/dvd.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,8 +1622,10 @@ static void __dvd_statebusy(dvdcmdblk *block)
16221622
return;
16231623
case 24:
16241624
_diReg[1] = _diReg[1];
1625-
block->currtxsize = block->len;
1626-
DVD_LowGcodeRead(block->buf,block->len,block->offset,__dvd_statebusycb);
1625+
len = block->len-block->txdsize;
1626+
if(len<0x500000) block->currtxsize = len;
1627+
else block->currtxsize = 0x500000;
1628+
DVD_LowGcodeRead(block->buf+block->txdsize,block->currtxsize,block->offset+(block->txdsize/DVD_GCODE_BLKSIZE),__dvd_statebusycb);
16271629
return;
16281630
case 25:
16291631
_diReg[1] = _diReg[1];

0 commit comments

Comments
 (0)