Scope-eye.net Git Repository
/
liskon_frotz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a6c1ac
)
Replace rindex() with strrchr()
author
Fredrik Fornwall
<fredrik@fornwall.net>
Sun, 30 Aug 2015 08:54:06 +0000
(10:54 +0200)
committer
Fredrik Fornwall
<fredrik@fornwall.net>
Sun, 30 Aug 2015 08:54:06 +0000
(10:54 +0200)
This fixes compilation on Android, and should be a general
improvement since rindex() is deprecated.
src/curses/ux_init.c
patch
|
blob
|
history
diff --git
a/src/curses/ux_init.c
b/src/curses/ux_init.c
index 114aa8560dcc93b768207bf0321424574e0a0620..b1d3faca8c0bb6aba852c0809f7a781d87c2b7ad 100644
(file)
--- a/
src/curses/ux_init.c
+++ b/
src/curses/ux_init.c
@@
-292,7
+292,7
@@
void os_process_arguments (int argc, char *argv[])
f_setup.story_name = strdup(basename(argv[optind]));
/* Now strip off the extension. */
- p =
rindex
(f_setup.story_name, '.');
+ p =
strrchr
(f_setup.story_name, '.');
if ((p != NULL) &&
((strcmp(p,EXT_BLORB2) == 0) ||
(strcmp(p,EXT_BLORB3) == 0) ||