Refactor: change light linking object storage be dynamically allocated #108090

Closed
Brecht Van Lommel wants to merge 128 commits from light-linking-dna into cycles-light-linking

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 5 additions and 1 deletions
Showing only changes of commit 8a4ab1b3fe - Show all commits

View File

@ -350,8 +350,8 @@ static int path_normalize_impl(char *path, bool check_blend_relative_prefix)
* as these directories are expected to be skipped. */
BLI_assert(!IS_PARENT_DIR(start));
const size_t start_len = path_len - (start - path);
memmove(path_first_non_slash_part, start, start_len + 1);
BLI_assert(strlen(start) == start_len);
memmove(path_first_non_slash_part, start, start_len + 1);
path_len -= start - path_first_non_slash_part;
BLI_assert(strlen(path) == path_len);
}

View File

@ -117,6 +117,10 @@ TEST(path_util, Normalize_UnbalancedAbsolute)
NORMALIZE("/a/b/c/../../../../../d", "/d");
NORMALIZE("/a/b/c/../../../../d", "/d");
NORMALIZE("/a/b/c/../../../d", "/d");
/* Use a longer path as it may hit corner cases. */
NORMALIZE("/home/username/Downloads/../../../../../Users/Example/Desktop/test.jpg",
"/Users/Example/Desktop/test.jpg");
}
/* #BLI_path_normalize: with relative paths that result in leading "../". */