do larger copies for safety reasons

This commit is contained in:
Luna 2019-07-11 10:51:00 -03:00
parent b9160adad2
commit 107a00593a
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
load :0;
eq 3 1 2 -0.3 0.7;
# eq 3 1 2 -0.3 0.7;
eq 10 3 3 -0.9 2;
quicksave;

View File

@ -284,9 +284,11 @@ pub const Image = struct {
out_file,
file_copy_buf,
usize(0),
seek_pos.start - 1,
seek_pos.start + @mod(seek_pos.start, BufferSize),
);
_ = c.sf_seek(self.sndfile, @intCast(i64, seek_pos.start), c.SEEK_SET);
var i: usize = seek_pos.start;
std.debug.warn("\tseek pos start: {} end: {}\n", seek_pos.start, seek_pos.end);
@ -306,7 +308,7 @@ pub const Image = struct {
out_file,
file_copy_buf,
seek_pos.end + 1,
file_end,
file_end + @mod(file_end, BufferSize),
);
c.sf_write_sync(out_file);