179
178
do { /* ensure we have enough chars for the new number in the name */
180
BLI_snprintf(num, sizeof(num), "%d", i++);
179
const size_t num_len = BLI_snprintf(num, sizeof(num), "%d", i++);
181
"%.*s%s", (int)(sizeof(prop->name) - num_len), base_name, num);
183
182
} while (bproperty_get(first, prop, new_name));
185
184
BLI_strncpy(prop->name, new_name, sizeof(prop->name));