Merge branch 'master' into blender2.8
[blender.git] / source / blender / blenkernel / intern / text.c
index a24020d7764e6473611ac58b91722c3d5701186d..226ab33e45e973dbdea22eb6d96bc931c2775d4d 100644 (file)
@@ -1702,7 +1702,7 @@ static void txt_undo_add_blockop(Text *text, TextUndoBuf *utxt, int op, const ch
        /* 4 bytes */
        txt_undo_store_uint32(utxt->buf, &utxt->pos, length);
        /* 'length' bytes */
-       strncpy(utxt->buf + utxt->pos, buf, length);
+       BLI_strncpy(utxt->buf + utxt->pos, buf, length);
        utxt->pos += length;
        /* 4 bytes */
        txt_undo_store_uint32(utxt->buf, &utxt->pos, length);