Cleanup: add STRNLEN macros to prevent incorrect sizeof() use
Missed in recent cleanup.
This commit is contained in:
@@ -1046,8 +1046,7 @@ static void legacy_gpencil_to_grease_pencil(ConversionData &conversion_data,
|
||||
int layer_idx = 0;
|
||||
LISTBASE_FOREACH_INDEX (bGPDlayer *, gpl, &gpd.layers, layer_idx) {
|
||||
/* Create a new layer. */
|
||||
Layer &new_layer = grease_pencil.add_layer(
|
||||
StringRefNull(gpl->info, BLI_strnlen(gpl->info, 128)));
|
||||
Layer &new_layer = grease_pencil.add_layer(StringRefNull(gpl->info, STRNLEN(gpl->info)));
|
||||
|
||||
/* Flags. */
|
||||
new_layer.set_visible((gpl->flag & GP_LAYER_HIDE) == 0);
|
||||
|
||||
@@ -265,5 +265,4 @@ int BLI_str_utf8_offset_from_column_with_tabs(const char *str,
|
||||
|
||||
#define STRNLEN_UTF8(str) BLI_strnlen_utf8(str, ARRAY_SIZE(str))
|
||||
|
||||
|
||||
/** \} */
|
||||
|
||||
Reference in New Issue
Block a user