summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 21b87fed..6cbff8ba 100644
--- a/lib.c
+++ b/lib.c
@@ -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 {