Skip to content

Commit 7e2aaee

Browse files
committed
minor change
1 parent 91f0661 commit 7e2aaee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/core/src/string.c.ri

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,9 @@ public struct string < Stringable, Hashable, Throwable {
436436
if !found {
437437
break;
438438
}
439+
if pos == 0 {
440+
break;
441+
}
439442
}
440443
return self.slice(0, pos + 1);
441444
}

0 commit comments

Comments
 (0)