head 1.2; access; symbols pkgsrc-2018Q2:1.1.0.14 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.12 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.10 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.8 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.4 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.2 pkgsrc-2017Q1-base:1.1; locks; strict; comment @// @; 1.2 date 2018.08.10.23.35.52; author nia; state dead; branches; next 1.1; commitid B1rd9rz9GcyGbDNA; 1.1 date 2017.02.08.00.02.18; author joerg; state Exp; branches; next ; commitid cH8QhRuQNF4NY4Fz; desc @@ 1.2 log @emulators/libretro-mednafen-pce-fast: Replaced by libretro-beetle-pce-fast @ text @$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) { @ 1.1 log @Don't order pointers with zero. @ text @d1 1 a1 1 $NetBSD$ @