[macruby-changes] [3718] MacRuby/branches/icu/string.c
source_changes at macosforge.org
source_changes at macosforge.org
Tue Mar 9 16:43:26 PST 2010
Revision: 3718
http://trac.macosforge.org/projects/ruby/changeset/3718
Author: lsansonetti at apple.com
Date: 2010-03-09 16:43:25 -0800 (Tue, 09 Mar 2010)
Log Message:
-----------
fixed a bug in string search
Modified Paths:
--------------
MacRuby/branches/icu/string.c
Modified: MacRuby/branches/icu/string.c
===================================================================
--- MacRuby/branches/icu/string.c 2010-03-09 23:04:10 UTC (rev 3717)
+++ MacRuby/branches/icu/string.c 2010-03-10 00:43:25 UTC (rev 3718)
@@ -1055,6 +1055,10 @@
str_must_have_compatible_encoding(self, searched);
str_make_same_format(self, searched);
+ if (searched->length_in_bytes == 0 && self->length_in_bytes == 0) {
+ return start_index;
+ }
+
long start_offset_in_bytes;
if (start_index == 0) {
start_offset_in_bytes = 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100309/6220f312/attachment.html>
More information about the macruby-changes
mailing list