unsigned long length;
uint8_t * v = (arg_bytevector (1, (&length)));
unsigned long end = (arg_ulong_index_integer (3, (length + 1)));
- unsigned long start = (arg_ulong_index_integer (2, end));
+ unsigned long start = (arg_ulong_index_integer (2, (end + 1)));
uint8_t value = (arg_byte (4));
memset ((v + start), value, (end - start));
}
unsigned long length;
uint8_t * v = (arg_bytevector (1, (&length)));
unsigned long end = (arg_ulong_index_integer (3, (length + 1)));
- unsigned long start = (arg_ulong_index_integer (2, end));
+ unsigned long start = (arg_ulong_index_integer (2, (end + 1)));
PRIMITIVE_RETURN (memory_to_bytevector ((end - start), (v + start)));
}
}
unsigned long from_length;
uint8_t * from_v = (arg_bytevector (3, (&from_length)));
unsigned long from_end = (arg_ulong_index_integer (5, (from_length + 1)));
- unsigned long from_start = (arg_ulong_index_integer (4, from_end));
+ unsigned long from_start = (arg_ulong_index_integer (4, (from_end + 1)));
unsigned long length = (from_end - from_start);
if ((to_length - to_start) < length)
error_bad_range_arg (5);