mirror of
https://github.com/ARMSX2/ARMSX1.git
synced 2026-08-24 16:53:35 -07:00
Fix line segfault
This commit is contained in:
@@ -1307,6 +1307,9 @@ void psx_cdrom_get_cdda_samples(psx_cdrom_t* cdrom, void* buf, int size) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cdrom->disc)
|
||||
return;
|
||||
|
||||
memcpy(buf, cdrom->cdda_buf, size);
|
||||
|
||||
// Convert seek to I
|
||||
|
||||
+1
-1
@@ -454,7 +454,7 @@ void plotLineLow(psx_gpu_t* gpu, int x0, int y0, int x1, int y1, uint16_t color)
|
||||
int y = y0;
|
||||
|
||||
for (int x = x0; x < x1; x++) {
|
||||
if ((x < 1024) && (y < 512))
|
||||
if ((x < 1024) && (y < 512) && (x >= 0) && (y >= 0))
|
||||
gpu->vram[x + (y * 1024)] = color;
|
||||
|
||||
if (d > 0) {
|
||||
|
||||
Reference in New Issue
Block a user