Commit 3d3fd837 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk Committed by Érico Nogueira Rolim

sdbfs: fix c&p bug in sdbfs_fwrite().

In sdbfs_fwrite(), memcpy should copy data from buf to file.

Commit taken from [1].

[1] wrpc-sw@3aebf265
parent 4f853dbb
......@@ -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);
else
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