aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/ringbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-src/ringbuffer.c')
-rw-r--r--util-src/ringbuffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util-src/ringbuffer.c b/util-src/ringbuffer.c
index 007aa2ec..0f250c12 100644
--- a/util-src/ringbuffer.c
+++ b/util-src/ringbuffer.c
@@ -262,15 +262,15 @@ static int rb_byte(lua_State *L) {
if(calc_splice_positions(b, start, end, &wrapped_start, &wrapped_end)) {
if(wrapped_end <= wrapped_start) {
for(i = wrapped_start; i < (long)b->alen; i++) {
- lua_pushinteger(L, b->buffer[i]);
+ lua_pushinteger(L, (unsigned char)b->buffer[i]);
}
for(i = 0; i < wrapped_end; i++) {
- lua_pushinteger(L, b->buffer[i]);
+ lua_pushinteger(L, (unsigned char)b->buffer[i]);
}
return wrapped_end + (b->alen - wrapped_start);
} else {
for(i = wrapped_start; i < wrapped_end; i++) {
- lua_pushinteger(L, b->buffer[i]);
+ lua_pushinteger(L, (unsigned char)b->buffer[i]);
}
return wrapped_end - wrapped_start;
}