summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-05-14 17:37:54 +0200
committerraysan5 <[email protected]>2020-05-14 17:37:54 +0200
commit7b001164ef2cd3b3bb481394f194baa574963b13 (patch)
tree0285bade065d73265996680b476a2d710ed4d495
parent64d44d131d272b7f18b3d7e3b433a5a97bceb6d3 (diff)
downloadraylib-7b001164ef2cd3b3bb481394f194baa574963b13.tar.gz
raylib-7b001164ef2cd3b3bb481394f194baa574963b13.zip
Review formatting GetPRevDirectoryPath()
-rw-r--r--src/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 0e7c098e..3f23fb9c 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;
}