Fix constant bounds checking for slicing

This commit is contained in:
Ginger Bill
2017-04-22 09:40:32 +01:00
parent 91ed51ff5c
commit 0ea815db49
5 changed files with 22 additions and 26 deletions
+1
View File
@@ -350,6 +350,7 @@ __slice_expr_error :: proc(file: string, line, column: int, low, high, max: int)
file, line, column, low, high, max);
__debug_trap();
}
__substring_expr_error :: proc(file: string, line, column: int, low, high: int) {
if 0 <= low && low <= high {
return;