Cleanup: fix harmless compiler warnings.
[blender.git] / source / blender / draw / engines / gpencil / gpencil_cache_utils.c
index 4c427a672d28a65741576c99516152992da2719c..8ae650a21eb407028ac733f4f468eb2fac151615 100644 (file)
@@ -102,7 +102,7 @@ tGPencilObjectCache *gpencil_object_cache_add(
 
        cache_elem->is_dup_ob = gpencil_check_ob_duplicated(cache_array, *gp_cache_used, ob);
 
-       sprintf(cache_elem->ob_name, "%s", ob->id.name);
+       STRNCPY(cache_elem->ob_name, ob->id.name);
        cache_elem->gpd = (bGPdata *)ob->data;
 
        copy_v3_v3(cache_elem->loc, ob->loc);