[Bf-blender-cvs] [45a312fd8fb] master: Fix build failure on Windows + wrong buffer size

Julian Eisel noreply at git.blender.org
Wed Sep 29 17:50:47 CEST 2021


Commit: 45a312fd8fb98b970cb999c7afa53f83c66b97ec
Author: Julian Eisel
Date:   Wed Sep 29 17:49:06 2021 +0200
Branches: master
https://developer.blender.org/rB45a312fd8fb98b970cb999c7afa53f83c66b97ec

Fix build failure on Windows + wrong buffer size

Was using `NAME_MAX` which is defined in `limits.h`, which again may be
implicitly included by the compiler. Intend was to use the Blender
define `MAX_NAME`.

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

M	source/blender/editors/asset/intern/asset_catalog.cc

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

diff --git a/source/blender/editors/asset/intern/asset_catalog.cc b/source/blender/editors/asset/intern/asset_catalog.cc
index 202d4234051..68f11d77f44 100644
--- a/source/blender/editors/asset/intern/asset_catalog.cc
+++ b/source/blender/editors/asset/intern/asset_catalog.cc
@@ -53,7 +53,7 @@ static std::string catalog_name_ensure_unique(AssetCatalogService &catalog_servi
 {
   CatalogUniqueNameFnData fn_data = {catalog_service, parent_path};
 
-  char unique_name[NAME_MAX] = "";
+  char unique_name[MAX_NAME] = "";
   BLI_uniquename_cb(
       catalog_name_exists_fn, &fn_data, name.c_str(), '.', unique_name, sizeof(unique_name));



More information about the Bf-blender-cvs mailing list