use BLI_strncpy and BLI_snprintf when the size of the string is known.
[blender-staging.git] / source / blender / blenkernel / intern / boids.c
index ec2e6b3c0782b7bc8f557ca8e334f1f034cd5df6..d454bef3184268cbc1993e10628b824697061262 100644 (file)
@@ -1503,7 +1503,7 @@ BoidState *boid_new_state(BoidSettings *boids)
 
        state->id = boids->last_state_id++;
        if(state->id)
-               sprintf(state->name, "State %i", state->id);
+               BLI_snprintf(state->name, sizeof(state->name), "State %i", state->id);
        else
                strcpy(state->name, "State");