Quellcode durchsuchen

Review formatting GetPRevDirectoryPath()

pull/1251/head
raysan5 vor 4 Jahren
Ursprung
Commit
7b001164ef
1 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen
  1. +3
    -2
      src/core.c

+ 3
- 2
src/core.c Datei anzeigen

@ -2125,8 +2125,9 @@ const char *GetPrevDirectoryPath(const char *dirPath)
{ {
if ((dirPath[i] == '\\') || (dirPath[i] == '/')) 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); strncpy(prevDirPath, dirPath, i);
break; break;
} }

Laden…
Abbrechen
Speichern