libretro / fceu-next

Port of FCEUmm / FCEUX to Libretro.
14 stars 9 forks source link

fix fceu-next crash when load unif format nes rom #12

Closed shunyuan closed 11 years ago

shunyuan commented 11 years ago

Here is the patch for fceumm-code/src/file.c to fix the crash when fceu-next load unif format nes rom (win32 platform).

The problem is read32le() internal will call memstream i/o to handle the stdio file pointer passed from FCEU_read32le().

@@ -435,10 +435,23 @@ int FCEU_read16le(uint16 val, FCEUFILE fp) { } *val = t[0] | (t[1] << 8); return(1); }

+static int fread32le(uint32 Bufo, MEM_TYPE fp) +{

Themaister commented 11 years ago

Eh ... This is unusable. Please make a pull request with the patch.