From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Thu, 23 Dec 2021 10:26:29 +0100 Subject: [PATCH] Replace a use of rindex() with strrchr() Co-Authored-By: Daniel Bertalan --- src/dosnames.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dosnames.c b/src/dosnames.c index b6122a9..582a0e2 100644 --- a/src/dosnames.c +++ b/src/dosnames.c @@ -9,6 +9,7 @@ #include #include #include +#include #include // DOS directory entries. @@ -589,7 +590,7 @@ char *dos_unix_path_fcb(int addr, int force) static struct dos_file_list *find_first_file(char *fspec) { // Now, separate the path to the spec - char *glob, *unixpath, *p = rindex(fspec, '/'); + char *glob, *unixpath, *p = strrchr(fspec, '/'); if(!p) { glob = fspec;