ref: e243750f8f47bb6a7d69c2d2ddaa1f0719148d22
parent: 308658de56bf1236ffa8dc3015b8c860e9ec1905
author: qwx <devnull@localhost>
date: Sat Mar 31 07:38:09 EDT 2018
gb*: reverse savegame field polarity
--- a/sys/src/games/gb/gb.c
+++ b/sys/src/games/gb/gb.c
@@ -99,7 +99,7 @@
buf = emalloc(strlen(file) + 4);
strcpy(buf, file);
- p = strchr(buf, '.');
+ p = strrchr(buf, '.');
if(p == nil)
p = buf + strlen(buf);
strcpy(p, ".sav");
--- a/sys/src/games/gba/gba.c
+++ b/sys/src/games/gba/gba.c
@@ -145,7 +145,7 @@
buf = emalloc(strlen(file) + 4);
strcpy(buf, file);
- p = strchr(buf, '.');
+ p = strrchr(buf, '.');
if(p == nil)
p = buf + strlen(buf);
strcpy(p, ".sav");
--
⑨