summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2017-02-08 00:02:18 +0000
committerjoerg <joerg@pkgsrc.org>2017-02-08 00:02:18 +0000
commitc13bbe32088dd5b07de888911ea684bd38eade25 (patch)
treebf05921250874c98ddc809e98406d82d647a8607
parenteab3ca543a4f27081e424555aaf9d756fb963e68 (diff)
downloadpkgsrc-c13bbe32088dd5b07de888911ea684bd38eade25.tar.gz
Don't order pointers with zero.
-rw-r--r--emulators/libretro-mednafen-pce-fast/distinfo3
-rw-r--r--emulators/libretro-mednafen-pce-fast/patches/patch-mednafen_mempatcher.cpp33
2 files changed, 35 insertions, 1 deletions
diff --git a/emulators/libretro-mednafen-pce-fast/distinfo b/emulators/libretro-mednafen-pce-fast/distinfo
index f53f775b9ae..8e0a58b4f05 100644
--- a/emulators/libretro-mednafen-pce-fast/distinfo
+++ b/emulators/libretro-mednafen-pce-fast/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2015/11/03 20:30:59 agc Exp $
+$NetBSD: distinfo,v 1.3 2017/02/08 00:02:18 joerg Exp $
SHA1 (mednafen-pce-fast-libretro-20150210.zip) = 4f85536b831f884169a7f3773aafea6722ebb744
RMD160 (mednafen-pce-fast-libretro-20150210.zip) = c6a55ca95c413637a6ffe2db6f454285bb02ee6f
SHA512 (mednafen-pce-fast-libretro-20150210.zip) = 876e06320cacb2286942aa11e9ea6b4e5d6140bf863e21a61169cc093d1c0495b929145535234e4ab61c2e7162617be9ffc426e2693cefcb8a1233ad339b67ca
Size (mednafen-pce-fast-libretro-20150210.zip) = 477795 bytes
+SHA1 (patch-mednafen_mempatcher.cpp) = b0832f1f10e78ad28a852a56540af575a824eeb2
diff --git a/emulators/libretro-mednafen-pce-fast/patches/patch-mednafen_mempatcher.cpp b/emulators/libretro-mednafen-pce-fast/patches/patch-mednafen_mempatcher.cpp
new file mode 100644
index 00000000000..9e3e5b47c6d
--- /dev/null
+++ b/emulators/libretro-mednafen-pce-fast/patches/patch-mednafen_mempatcher.cpp
@@ -0,0 +1,33 @@
+$NetBSD: patch-mednafen_mempatcher.cpp,v 1.1 2017/02/08 00:02:18 joerg Exp $
+
+Pointers are not relative to 0.
+
+--- mednafen/mempatcher.cpp.orig 2017-01-08 19:45:01.356354564 +0000
++++ mednafen/mempatcher.cpp
+@@ -196,7 +196,7 @@ static bool SeekToOurSection(void *fp_pt
+ FILE *fp = (FILE*)fp_ptr;
+ char buf[2048];
+
+- while(fgets(buf,2048,fp) > 0)
++ while(fgets(buf,2048,fp))
+ {
+ if(buf[0] == '[')
+ {
+@@ -253,7 +253,7 @@ void MDFN_LoadGameCheats(void *override_
+
+ if(SeekToOurSection(fp))
+ {
+- while(fgets(linebuf,2048,fp) > 0)
++ while(fgets(linebuf,2048,fp))
+ {
+ char namebuf[2048];
+ char *tbuf=linebuf;
+@@ -395,7 +395,7 @@ void MDFN_FlushGameCheats(int nosave)
+ {
+ FILE *tmp_fp = fopen(tmp_fn.c_str(), "wb");
+
+- while(fgets((char*)linebuf, 2048, fp) > 0)
++ while(fgets((char*)linebuf, 2048, fp))
+ {
+ if(linebuf[0] == '[' && !insection)
+ {