diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-10-20 14:20:44 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-10-20 21:03:17 +0300 |
commit | 010e675b1b436a824a3149dd478a1c8f4191fe42 (patch) | |
tree | 5511bfd73e885fec46ff674e00f8c9c6d22fde47 /source/blender/blenlib/intern/string_utils.c | |
parent | 1de837437498f25997fa69df152529fe92a51f5c (diff) |
Fix missing null-terminator in BLI_string_join_arrayN
Although the documentation says so, the null-terminator was missing.
This could cause crashes when logging shader linking errors as shader
sources are empty in this case.
Diffstat (limited to 'source/blender/blenlib/intern/string_utils.c')
-rw-r--r-- | source/blender/blenlib/intern/string_utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/string_utils.c b/source/blender/blenlib/intern/string_utils.c index bd733aca4f1..798eb60f64d 100644 --- a/source/blender/blenlib/intern/string_utils.c +++ b/source/blender/blenlib/intern/string_utils.c @@ -469,6 +469,7 @@ char *BLI_string_join_arrayN(const char *strings[], uint strings_len) for (uint i = 0; i < strings_len; i++) { c += BLI_strcpy_rlen(c, strings[i]); } + *c = '\0'; return result; } |