[Bf-blender-cvs] [088636bc380] master: Cleanup: use BLI_strnlen instead of strlen

Campbell Barton noreply at git.blender.org
Fri Mar 6 02:49:57 CET 2020


Commit: 088636bc380a5f5f61f244e22e197d043de9de1a
Author: Campbell Barton
Date:   Fri Mar 6 12:43:58 2020 +1100
Branches: master
https://developer.blender.org/rB088636bc380a5f5f61f244e22e197d043de9de1a

Cleanup: use BLI_strnlen instead of strlen

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

M	source/blender/editors/space_file/fsmenu.c

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

diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index f9dbe49604d..c8ced692f6e 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -1014,7 +1014,7 @@ void fsmenu_read_system(struct FSMenu *fsmenu, int read_bookmarks)
    * the FS_CATEGORY_OTHER category so that these directories
    * have the appropriate icons when they are added to the Bookmarks. */
 #define FS_UDIR_PATH(dir, icon) \
-  if (strlen(dir) > 2) { \
+  if (BLI_strnlen(dir, 3) > 2) { \
     fsmenu_insert_entry(fsmenu, FS_CATEGORY_OTHER, dir, NULL, icon, FS_INSERT_LAST); \
   }



More information about the Bf-blender-cvs mailing list