cabinet/tests: Advance buffer by actually read bytes count.
Dmitry Timoshkov
dmitry at baikal.ru
Mon Feb 10 00:10:29 CST 2014
In case somebody reuses this implementation somewhere else.
---
dlls/cabinet/tests/fdi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/cabinet/tests/fdi.c b/dlls/cabinet/tests/fdi.c
index afae707..4ed967a 100644
--- a/dlls/cabinet/tests/fdi.c
+++ b/dlls/cabinet/tests/fdi.c
@@ -721,7 +721,7 @@ static UINT CDECL fdi_mem_read(INT_PTR hf, void *pv, UINT cb)
cb_read = (available >= cb) ? cb : available;
memcpy(pv, data->base + data->pos, cb_read);
- data->pos += cb;
+ data->pos += cb_read;
/*trace("mem_read(%p,%p,%u) => %u\n", hf, pv, cb, cb_read);*/
return cb_read;
--
1.8.5.3
More information about the wine-patches
mailing list