diff options
| author | Boris Gjenero <dreamlayers@rockbox.org> | 2011-11-27 01:40:47 +0000 |
|---|---|---|
| committer | Boris Gjenero <dreamlayers@rockbox.org> | 2011-11-27 01:40:47 +0000 |
| commit | bd360b422ae4b03c3ef161ad5fd204feb9c6c62c (patch) | |
| tree | 74458a5892d366c137fdef5cffd4c6740c9a8940 | |
| parent | 99ea0c5051d51b8cd72e009b96442942f1766792 (diff) | |
| download | rockbox-bd360b422ae4b03c3ef161ad5fd204feb9c6c62c.zip rockbox-bd360b422ae4b03c3ef161ad5fd204feb9c6c62c.tar.gz rockbox-bd360b422ae4b03c3ef161ad5fd204feb9c6c62c.tar.bz2 rockbox-bd360b422ae4b03c3ef161ad5fd204feb9c6c62c.tar.xz | |
In buflib_buffer_shift(), properly update handle->alloc values, which are char * and not union buflib data *
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31066 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/buflib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/buflib.c b/firmware/buflib.c index 43fc4bd..748e8a2 100644 --- a/firmware/buflib.c +++ b/firmware/buflib.c @@ -366,12 +366,13 @@ buflib_buffer_shift(struct buflib_context *ctx, int shift) { memmove(ctx->buf_start + shift, ctx->buf_start, (ctx->alloc_end - ctx->buf_start) * sizeof(union buflib_data)); + ctx->buf_start += shift; + ctx->alloc_end += shift; + shift *= sizeof(union buflib_data); union buflib_data *handle; for (handle = ctx->last_handle; handle < ctx->handle_table; handle++) if (handle->alloc) handle->alloc += shift; - ctx->buf_start += shift; - ctx->alloc_end += shift; } /* Shift buffered items up by size bytes, or as many as possible if size == 0. |