diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-14 14:39:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-14 14:39:18 +0400 |
commit | ffc8ecc5874931e7a0040141a7bc3ad1b70b17d0 (patch) | |
tree | e8c64602442e650b5c0c78a614d19a713571ecd0 /source/blender/editors/space_info/info_stats.c | |
parent | cf3b3a1ba2159792fad7cc0c8ccb98a855534823 (diff) |
use BLI_strncpy_rlen() rather then BLI_snprintf() when no formatting is needed.
also replace sprintf with strcpy when no formatting is done.
Diffstat (limited to 'source/blender/editors/space_info/info_stats.c')
-rw-r--r-- | source/blender/editors/space_info/info_stats.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 141956b8919..b2e9427c799 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -384,7 +384,7 @@ static void stats_string(Scene *scene) if (scene->obedit) { if (BKE_keyblock_from_object(scene->obedit)) - ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, "%s", IFACE_("(Key) ")); + ofs += BLI_strncpy_rlen(s + ofs, IFACE_("(Key) "), MAX_INFO_LEN - ofs); if (scene->obedit->type == OB_MESH) { ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, @@ -400,7 +400,7 @@ static void stats_string(Scene *scene) ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, IFACE_("Verts:%d/%d"), stats->totvertsel, stats->totvert); } - ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, "%s", memstr); + ofs += BLI_strncpy_rlen(s + ofs, memstr, MAX_INFO_LEN - ofs); } else if (ob && (ob->mode & OB_MODE_POSE)) { ofs += BLI_snprintf(s + ofs, MAX_INFO_LEN - ofs, IFACE_("Bones:%d/%d %s"), |