diff options
author | Hans Goudey <h.goudey@me.com> | 2022-11-11 04:14:48 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-11-11 04:41:13 +0300 |
commit | 9465b109af0b70244a36f9e68493e316d9f8b56f (patch) | |
tree | c4d933bf09f8313071556063156538ec3356b24c /source/blender/blenloader/intern/writefile.cc | |
parent | 026d21a225521670c6b5083da9da61227da69e65 (diff) | |
parent | ca1642cd0c5cdf634fe2022c955d93983de95934 (diff) |
Merge branch 'master' into refactor-mesh-position-genericrefactor-mesh-position-generic
Diffstat (limited to 'source/blender/blenloader/intern/writefile.cc')
-rw-r--r-- | source/blender/blenloader/intern/writefile.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenloader/intern/writefile.cc b/source/blender/blenloader/intern/writefile.cc index 42bc884098e..6e48b65eb25 100644 --- a/source/blender/blenloader/intern/writefile.cc +++ b/source/blender/blenloader/intern/writefile.cc @@ -1048,7 +1048,7 @@ static void write_global(WriteData *wd, int fileflags, Main *mainvar) if (fileflags & G_FILE_RECOVER_WRITE) { STRNCPY(fg.filepath, mainvar->filepath); } - sprintf(subvstr, "%4d", BLENDER_FILE_SUBVERSION); + BLI_snprintf(subvstr, sizeof(subvstr), "%4d", BLENDER_FILE_SUBVERSION); memcpy(fg.subvstr, subvstr, 4); fg.subversion = BLENDER_FILE_SUBVERSION; @@ -1102,11 +1102,12 @@ static bool write_file_handle(Main *mainvar, wd = mywrite_begin(ww, compare, current); BlendWriter writer = {wd}; - sprintf(buf, - "BLENDER%c%c%.3d", - (sizeof(void *) == 8) ? '-' : '_', - (ENDIAN_ORDER == B_ENDIAN) ? 'V' : 'v', - BLENDER_FILE_VERSION); + BLI_snprintf(buf, + sizeof(buf), + "BLENDER%c%c%.3d", + (sizeof(void *) == 8) ? '-' : '_', + (ENDIAN_ORDER == B_ENDIAN) ? 'V' : 'v', + BLENDER_FILE_VERSION); mywrite(wd, buf, 12); |