aboutsummaryrefslogtreecommitdiff
path: root/filesystem/src
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem/src')
-rw-r--r--filesystem/src/filesystem.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/filesystem/src/filesystem.c b/filesystem/src/filesystem.c
index 5a8eeec..f6bb693 100644
--- a/filesystem/src/filesystem.c
+++ b/filesystem/src/filesystem.c
@@ -73,8 +73,7 @@ bool make_relative_path(
73 return true; 73 return true;
74 } 74 }
75 75
76 // Search for the last / in the tile map file path to get its parent 76 // Search for the last / in the file path to get its parent directory.
77 // directory.
78 assert(filepath_len > 0); 77 assert(filepath_len > 0);
79 size_t tm_dir_len = 0; 78 size_t tm_dir_len = 0;
80 for (tm_dir_len = strlen(filepath) - 1; tm_dir_len > 0; --tm_dir_len) { 79 for (tm_dir_len = strlen(filepath) - 1; tm_dir_len > 0; --tm_dir_len) {
@@ -84,7 +83,7 @@ bool make_relative_path(
84 } 83 }
85 tm_dir_len++; // Preserve the backslash. 84 tm_dir_len++; // Preserve the backslash.
86 85
87 // Copy the tile set file path where the parent dir ends. 86 // Copy the file path where the parent dir ends.
88 // Make sure there is enough space in the output. 87 // Make sure there is enough space in the output.
89 if ((tm_dir_len + path_len + 1) >= relative_length) { 88 if ((tm_dir_len + path_len + 1) >= relative_length) {
90 return false; 89 return false;