From f351cb547929e7be92651d579d96e8a4ab944fc6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 26 Apr 2017 21:06:00 +1000 Subject: Avoid platform dependant PATH_MAX --- source/blender/alembic/intern/alembic_capi.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/alembic') diff --git a/source/blender/alembic/intern/alembic_capi.cc b/source/blender/alembic/intern/alembic_capi.cc index 50e7626ad1e..15f3d1ff6ea 100644 --- a/source/blender/alembic/intern/alembic_capi.cc +++ b/source/blender/alembic/intern/alembic_capi.cc @@ -172,7 +172,7 @@ static bool gather_objects_paths(const IObject &object, ListBase *object_paths) void *abc_path_void = MEM_callocN(sizeof(AlembicObjectPath), "AlembicObjectPath"); AlembicObjectPath *abc_path = static_cast(abc_path_void); - BLI_strncpy(abc_path->path, object.getFullName().c_str(), PATH_MAX); + BLI_strncpy(abc_path->path, object.getFullName().c_str(), sizeof(abc_path->path)); BLI_addtail(object_paths, abc_path); } @@ -542,7 +542,7 @@ static std::pair visit_object( AlembicObjectPath *abc_path = static_cast( MEM_callocN(sizeof(AlembicObjectPath), "AlembicObjectPath")); - BLI_strncpy(abc_path->path, full_name.c_str(), PATH_MAX); + BLI_strncpy(abc_path->path, full_name.c_str(), sizeof(abc_path->path)); BLI_addtail(&settings.cache_file->object_paths, abc_path); /* We can now assign this reader as parent for our children. */ -- cgit v1.2.3