From d47355280677d7397ee0549ca1b8ae9429c3cf9f Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Thu, 8 Dec 2011 17:13:12 -0600 Subject: [PATCH] byte-string-ref should return unsigned fixnums (0 <= x <= 255). --- interp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interp.c b/interp.c index 05fab5b..c35cec4 100644 --- a/interp.c +++ b/interp.c @@ -24,7 +24,7 @@ */ static value_t vector_ref(value_t v, fixnum_t idx); -static char byte_string_ref(value_t v, fixnum_t idx); +static uint8_t byte_string_ref(value_t v, fixnum_t idx); static value_t struct_ref(value_t v, fixnum_t idx); static void vector_set(value_t v, fixnum_t idx, value_t newval); @@ -150,7 +150,7 @@ static value_t vector_ref(value_t v, fixnum_t idx) return vec->elements[idx]; } -static char byte_string_ref(value_t v, fixnum_t idx) +static uint8_t byte_string_ref(value_t v, fixnum_t idx) { byte_string_t *str = get_byte_string(v); release_assert((idx >= 0) && (idx < str->size));