summaryrefslogtreecommitdiffstats
path: root/byterun/str.c
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/str.c')
-rw-r--r--byterun/str.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/byterun/str.c b/byterun/str.c
index 8151fa37c..79e4ef81b 100644
--- a/byterun/str.c
+++ b/byterun/str.c
@@ -52,14 +52,14 @@ CAMLprim value caml_create_string(value len)
CAMLprim value caml_string_get(value str, value index)
{
- long idx = Long_val(index);
+ intnat idx = Long_val(index);
if (idx < 0 || idx >= caml_string_length(str)) caml_array_bound_error();
return Val_int(Byte_u(str, idx));
}
CAMLprim value caml_string_set(value str, value index, value newval)
{
- long idx = Long_val(index);
+ intnat idx = Long_val(index);
if (idx < 0 || idx >= caml_string_length(str)) caml_array_bound_error();
Byte_u(str, idx) = Int_val(newval);
return Val_unit;