From 17d0e44f57a34b20820c7072296b93f6b42ba167 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 30 Aug 2015 10:54:06 +0200 Subject: [PATCH] Replace rindex() with strrchr() This fixes compilation on Android, and should be a general improvement since rindex() is deprecated. --- src/curses/ux_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) || -- 2.34.1