diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-11 12:05:24 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-11 12:06:15 +0300 |
commit | 28c34ae7e2d61d0b1c570b7d9a303267404e54be (patch) | |
tree | 357d697b54a00deba244be587754df9a0efa5ee0 /source/blender/blenkernel/intern/suggestions.c | |
parent | 4d339f56fe04affc32ad5849fbe3fd395146e515 (diff) |
Cleanup: Use BLI_strncpy
It has behavior which we expect, and silences strict compiler warning.
Diffstat (limited to 'source/blender/blenkernel/intern/suggestions.c')
-rw-r--r-- | source/blender/blenkernel/intern/suggestions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/suggestions.c b/source/blender/blenkernel/intern/suggestions.c index eb17e103671..b74143b5c07 100644 --- a/source/blender/blenkernel/intern/suggestions.c +++ b/source/blender/blenkernel/intern/suggestions.c @@ -246,12 +246,12 @@ void texttool_docs_show(const char *docs) /* Ensure documentation ends with a '\n' */ if (docs[len - 1] != '\n') { documentation = MEM_mallocN(len + 2, "Documentation"); - strncpy(documentation, docs, len); + BLI_strncpy(documentation, docs, len); documentation[len++] = '\n'; } else { documentation = MEM_mallocN(len + 1, "Documentation"); - strncpy(documentation, docs, len); + BLI_strncpy(documentation, docs, len); } documentation[len] = '\0'; } |