From e316fa3f37df3f128381e6ea1af410a829a8eb2e Mon Sep 17 00:00:00 2001 From: bzt Date: Wed, 16 Feb 2022 22:52:28 +0100 Subject: [PATCH] Fixed issue #29 with strrchr --- uefi/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uefi/string.c b/uefi/string.c index 3286e7b..e8d6214 100644 --- a/uefi/string.c +++ b/uefi/string.c @@ -195,9 +195,9 @@ char_t *strrchr(const char_t *s, int c) char_t *e; if(s) { e = (char_t*)s + strlen(s) - 1; - while(s < e) { + while(s <= e) { if(*e == (char_t)c) return e; - s--; + e--; } } return NULL;