mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-06 04:42:15 -04:00
Fix compile time bounds check test
This commit is contained in:
1 parent
52dcaeb1e9
commit
4c2f03b1f2
1 file changed
+2
-2
+2
-2
@@ -2647,9 +2647,9 @@ bool check_index_value(CheckerContext *c, bool open_range, Ast *index_value, i64
|
||||
if (value) *value = v;
|
||||
bool out_of_bounds = false;
|
||||
if (open_range) {
|
||||
out_of_bounds = v > max_count;
|
||||
out_of_bounds = v > max_count+1;
|
||||
} else {
|
||||
out_of_bounds = v >= max_count;
|
||||
out_of_bounds = v > max_count;
|
||||
}
|
||||
if (v < 0) {
|
||||
out_of_bounds = true;
|
||||
|
||||
Reference in new issue
Block a user