From: Fredrik Fornwall Date: Sun, 30 Aug 2015 08:54:06 +0000 (+0200) Subject: Replace rindex() with strrchr() X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=17d0e44f57a34b20820c7072296b93f6b42ba167;p=liskon_frotz.git Replace rindex() with strrchr() This fixes compilation on Android, and should be a general improvement since rindex() is deprecated. --- diff --git a/src/curses/ux_init.c b/src/curses/ux_init.c index 114aa85..b1d3fac 100644 --- 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) ||