Don't use PRIkrk_int in exception format strings, we can't trust it
This commit is contained in:
parent
5190c0c9ab
commit
efb73c8759
@ -7,7 +7,7 @@
|
||||
|
||||
#define LIST_WRAP_INDEX() \
|
||||
if (index < 0) index += self->values.count; \
|
||||
if (unlikely(index < 0 || index >= (krk_integer_type)self->values.count)) return krk_runtimeError(vm.exceptions->indexError, "list index out of range: " PRIkrk_int, index)
|
||||
if (unlikely(index < 0 || index >= (krk_integer_type)self->values.count)) return krk_runtimeError(vm.exceptions->indexError, "list index out of range: %zd", (ssize_t)index)
|
||||
|
||||
#define LIST_WRAP_SOFT(val) \
|
||||
if (val < 0) val += self->values.count; \
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#define TUPLE_WRAP_INDEX() \
|
||||
if (index < 0) index += self->values.count; \
|
||||
if (index < 0 || index >= (krk_integer_type)self->values.count) return krk_runtimeError(vm.exceptions->indexError, "tuple index out of range: " PRIkrk_int, index)
|
||||
if (index < 0 || index >= (krk_integer_type)self->values.count) return krk_runtimeError(vm.exceptions->indexError, "tuple index out of range: %zd", (ssize_t)index)
|
||||
|
||||
static int _tuple_init_callback(void * context, const KrkValue * values, size_t count) {
|
||||
KrkValueArray * positionals = context;
|
||||
|
Loading…
Reference in New Issue
Block a user