Fix [#26207] Render.exe mangles paths in mysterious and awesome ways

Reported by Edwin Amsler

The function for extrapolating the template name with the frame number didn't properly NULL-terminate the
resulting string, this causing broken names and weird paths (if you were lucky - totally unusuable names
detected while stepping through the code).
This commit is contained in:
Nathan Letwory
2011-03-01 12:52:00 +00:00
parent 5bf1bf645c
commit 900199d215

View File

@@ -609,6 +609,7 @@ int BLI_path_frame(char *path, int frame, int digits)
p= tmp + ch_sta;
p += sprintf(p, format, frame);
memcpy(p, path + ch_end, strlen(path + ch_end));
*(tmp+strlen(path)) = '\0';
#endif
strcpy(path, tmp);
return 1;