summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqwx <devnull@localhost>2018-03-31 11:38:09 +0200
committerqwx <devnull@localhost>2018-03-31 11:38:09 +0200
commit7d18756b39cc33482f8cf5574b20a51331c4cea3 (patch)
tree74c75aad8cddbd2bf834607d90cc343b8d0a0440
parent84351ae4cb50857fe62e0938198db0c7ea33d05c (diff)
gb*: reverse savegame field polarity
-rw-r--r--sys/src/games/gb/gb.c2
-rw-r--r--sys/src/games/gba/gba.c2
2 files changed, 2 insertions, 2 deletions
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");