From 285c9ef20b2a04fc0d614169cb099ad88a6745aa Mon Sep 17 00:00:00 2001 From: Th3maz1ng Date: Sun, 17 Apr 2022 21:54:41 +0200 Subject: [PATCH] Removed the use of the lastIndexOf function which was replaced by the builtin strrchr function --- src/app/FTPServer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/FTPServer.h b/src/app/FTPServer.h index fadc76f..0e23015 100644 --- a/src/app/FTPServer.h +++ b/src/app/FTPServer.h @@ -473,7 +473,7 @@ class FTPServer : public TCPServer char *dirCopy = (char *)malloc((sizeof(char) * strlen(client->_currentDirectory)) + 1); strcpy(dirCopy, client->_currentDirectory); - char *p = lastIndexOf(dirCopy, '/'); + char *p = strrchr(dirCopy, '/'); if (dirCopy == p) { *(p + 1) = '\0';