From 7b001164ef2cd3b3bb481394f194baa574963b13 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Thu, 14 May 2020 17:37:54 +0200 Subject: [PATCH] Review formatting GetPRevDirectoryPath() --- src/core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index 0e7c098e3..3f23fb9c2 100644 --- a/src/core.c +++ b/src/core.c @@ -2125,8 +2125,9 @@ const char *GetPrevDirectoryPath(const char *dirPath) { if ((dirPath[i] == '\\') || (dirPath[i] == '/')) { - if ((i == 2) && (dirPath[1] ==':') // Check for root: "C:\" - || i == 0) i++; // Check for root: "/" + // Check for root: "C:\" or "/" + if (((i == 2) && (dirPath[1] ==':')) || (i == 0)) i++; + strncpy(prevDirPath, dirPath, i); break; }