Commit 3aebf265 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

sdb-lib: fixing c&p bug, in sdbfs_fwrite() memcpy should copy data from buf to file

parent a0f9eb9f
......@@ -51,7 +51,7 @@ int sdbfs_fwrite(struct sdbfs *fs, int offset, void *buf, int count)
count = fs->f_len - offset;
ret = count;
if (fs->data)
memcpy(buf, fs->data + fs->f_offset + offset, count);
memcpy(fs->data + fs->f_offset + offset, buf, count);
ret = fs->write(fs, fs->f_offset + offset, buf, count);
if (ret > 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment