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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user