From 7c797d6023b0054cabb0b78b76a7abe089410e1d Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 7 Jul 2024 13:07:11 +0200 Subject: Replaced rindex() with strrchr() --- FICS/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FICS/utils.c b/FICS/utils.c index ac064f6..05ee795 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -863,7 +863,7 @@ file_wplayer(char *fname) strlcpy(tmp, fname, sizeof tmp); - if ((ptr = rindex(tmp, '-')) == NULL) + if ((ptr = strrchr(tmp, '-')) == NULL) return ""; *ptr = '\0'; return tmp; @@ -874,7 +874,7 @@ file_bplayer(char *fname) { char *ptr; - if ((ptr = rindex(fname, '-')) == NULL) + if ((ptr = strrchr(fname, '-')) == NULL) return ""; return ptr + 1; } -- cgit v1.2.3