byte-string-ref should return unsigned fixnums (0 <= x <= 255).

This commit is contained in:
Jesse D. McDonald 2011-12-08 17:13:12 -06:00
parent d79eab3848
commit d473552806
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@
*/ */
static value_t vector_ref(value_t v, fixnum_t idx); 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 value_t struct_ref(value_t v, fixnum_t idx);
static void vector_set(value_t v, fixnum_t idx, value_t newval); 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]; 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); byte_string_t *str = get_byte_string(v);
release_assert((idx >= 0) && (idx < str->size)); release_assert((idx >= 0) && (idx < str->size));