diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib.c | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2012-03-24 Kaz Kylheku <kaz@kylheku.com> + + * lib.c (search_str): If start_num is nil, default it to zero. + This is needed for this to work right as an optional argument. + 2012-03-23 Kaz Kylheku <kaz@kylheku.com> Version 62 @@ -1490,6 +1490,10 @@ const wchar_t *c_str(val obj) val search_str(val haystack, val needle, val start_num, val from_end) { + uses_or2; + + start_num = or2(start_num, zero); + if (length_str_lt(haystack, start_num)) { return nil; } else { |