mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-01 19:23:04 +00:00
Fix project saves where old data was left at the end if project has shrunk in size
This commit is contained in:
parent
5c5114c542
commit
f024521b7d
@ -77,7 +77,7 @@ R_API int r_core_project_save(RCore *core, const char *file) {
|
|||||||
}
|
}
|
||||||
r_core_project_init (core);
|
r_core_project_init (core);
|
||||||
r_anal_project_save (core->anal, prj);
|
r_anal_project_save (core->anal, prj);
|
||||||
fd = r_sandbox_open (prj, O_BINARY|O_RDWR|O_CREAT, 0644);
|
fd = r_sandbox_open (prj, O_BINARY|O_RDWR|O_CREAT|O_TRUNC, 0644);
|
||||||
if (fd != -1) {
|
if (fd != -1) {
|
||||||
fdold = r_cons_singleton ()->fdout;
|
fdold = r_cons_singleton ()->fdout;
|
||||||
r_cons_singleton ()->fdout = fd;
|
r_cons_singleton ()->fdout = fd;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user