From 3095ae6a07c1550b60277ed599a2d6593687a211 Mon Sep 17 00:00:00 2001 From: martinvuyk Date: Tue, 10 Dec 2024 20:47:54 -0300 Subject: [PATCH] fix detail Signed-off-by: martinvuyk --- stdlib/src/collections/list.mojo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/src/collections/list.mojo b/stdlib/src/collections/list.mojo index 232e31f305..777a42173b 100644 --- a/stdlib/src/collections/list.mojo +++ b/stdlib/src/collections/list.mojo @@ -738,8 +738,8 @@ struct List[T: CollectionElement, hint_trivial_type: Bool = False]( if stop_normalized < 0: stop_normalized += len(self) - start_normalized = max(start_normalized, min(0, len(self))) - stop_normalized = max(stop_normalized, min(0, len(self))) + start_normalized = max(0, min(start_normalized, len(self))) + stop_normalized = max(0, min(stop_normalized, len(self))) for i in range(start_normalized, stop_normalized): if self[i] == value: