[Bf-blender-cvs] [cfbac9032b0] master: Docs: note why BLI_string_join_arrayN needs to nil terminate

Campbell Barton noreply at git.blender.org
Thu Oct 21 08:11:35 CEST 2021


Commit: cfbac9032b0009f760e93f9e70813ac6693b26cb
Author: Campbell Barton
Date:   Thu Oct 21 17:10:19 2021 +1100
Branches: master
https://developer.blender.org/rBcfbac9032b0009f760e93f9e70813ac6693b26cb

Docs: note why BLI_string_join_arrayN needs to nil terminate

===================================================================

M	source/blender/blenlib/intern/string_utils.c

===================================================================

diff --git a/source/blender/blenlib/intern/string_utils.c b/source/blender/blenlib/intern/string_utils.c
index 798eb60f64d..b62b9c3bc7a 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]);
   }
+  /* Only needed when `strings_len == 0`. */
   *c = '\0';
   return result;
 }



More information about the Bf-blender-cvs mailing list