[macruby-changes] [3582] MacRuby/branches/icu/string.c
source_changes at macosforge.org
source_changes at macosforge.org
Fri Feb 19 20:27:44 PST 2010
Revision: 3582
http://trac.macosforge.org/projects/ruby/changeset/3582
Author: lsansonetti at apple.com
Date: 2010-02-19 20:27:42 -0800 (Fri, 19 Feb 2010)
Log Message:
-----------
fixing a potential issue
Modified Paths:
--------------
MacRuby/branches/icu/string.c
Modified: MacRuby/branches/icu/string.c
===================================================================
--- MacRuby/branches/icu/string.c 2010-02-20 04:23:17 UTC (rev 3581)
+++ MacRuby/branches/icu/string.c 2010-02-20 04:27:42 UTC (rev 3582)
@@ -227,9 +227,13 @@
memcpy(self->data.bytes, bytes, len);
self->length_in_bytes = len;
}
+ else {
+ self->length_in_bytes = 0;
+ }
}
else {
self->data.bytes = NULL;
+ self->length_in_bytes = 0;
}
}
@@ -278,8 +282,15 @@
memcpy(self->data.uchars, chars, len);
self->length_in_bytes = len;
}
+ else {
+ self->length_in_bytes = 0;
+ }
str_set_stored_in_uchars(self, true);
}
+ else {
+ self->data.uchars = NULL;
+ self->length_in_bytes = 0;
+ }
}
static void
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100219/819f74a2/attachment.html>
More information about the macruby-changes
mailing list