Skip to content

Commit

Permalink
Str.index() should work when the search string is "0"
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Feb 23, 2009
1 parent 92d94aa commit 108dfb5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/builtins/any-str.pir
Expand Up @@ -276,7 +276,8 @@ Returns the invocant formatted by an implicit call to C<sprintf>.
s = self
check_substring:
if substring goto substring_search
$I1 = length substring
if $I1 goto substring_search
$I0 = length s
if pos < $I0 goto done
pos = $I0
Expand Down

0 comments on commit 108dfb5

Please sign in to comment.