summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/array.h
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/dimension/array.h')
-rw-r--r--libdimension/dimension/array.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/dimension/array.h b/libdimension/dimension/array.h
index f840e58..e383ece 100644
--- a/libdimension/dimension/array.h
+++ b/libdimension/dimension/array.h
@@ -105,11 +105,11 @@ dmnsn_array_set(dmnsn_array *array, size_t i, const void *obj)
/* Element access */
DMNSN_INLINE void *
-dmnsn_array_at(dmnsn_array *array, size_t i)
+dmnsn_array_at(const dmnsn_array *array, size_t i)
{
if (i >= dmnsn_array_size(array)) {
/* Resize if i is out of range */
- dmnsn_array_resize(array, i + 1);
+ dmnsn_error(DMNSN_SEVERITY_HIGH, "Array index out of bounds.");
}
return (char *)array->ptr + array->obj_size*i;
}