From 639196f28de0bdc1ff42aada9d243ea341cfe882 Mon Sep 17 00:00:00 2001 From: TheRadischen <119001853+TheRadischen@users.noreply.github.com> Date: Wed, 3 Jun 2026 22:33:49 +0200 Subject: [PATCH] Update slice.odin added a check for rotate_left rotating with 0 length array crashes --- core/slice/slice.odin | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/slice/slice.odin b/core/slice/slice.odin index 0df55320b..464a30339 100644 --- a/core/slice/slice.odin +++ b/core/slice/slice.odin @@ -433,6 +433,9 @@ fill :: proc "contextless" (array: $T/[]$E, value: E) #no_bounds_check { } rotate_left :: proc "contextless" (array: $T/[]$E, mid: int) { + if len(a) == 0 { + return + } n := len(array) m := mid %% n k := n - m