From: qwx Date: Sat, 31 Mar 2018 09:38:09 +0000 (+0200) Subject: gb*: reverse savegame field polarity X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=7d18756b39cc33482f8cf5574b20a51331c4cea3;p=plan9front.git gb*: reverse savegame field polarity --- diff --git a/sys/src/games/gb/gb.c b/sys/src/games/gb/gb.c index d6762b182..374af931a 100644 --- a/sys/src/games/gb/gb.c +++ b/sys/src/games/gb/gb.c @@ -99,7 +99,7 @@ loadsave(char *file) buf = emalloc(strlen(file) + 4); strcpy(buf, file); - p = strchr(buf, '.'); + p = strrchr(buf, '.'); if(p == nil) p = buf + strlen(buf); strcpy(p, ".sav"); diff --git a/sys/src/games/gba/gba.c b/sys/src/games/gba/gba.c index 8457b1e6f..5a53b68b3 100644 --- a/sys/src/games/gba/gba.c +++ b/sys/src/games/gba/gba.c @@ -145,7 +145,7 @@ loadsave(char *file) buf = emalloc(strlen(file) + 4); strcpy(buf, file); - p = strchr(buf, '.'); + p = strrchr(buf, '.'); if(p == nil) p = buf + strlen(buf); strcpy(p, ".sav");