Hi,
In message "[ruby-talk:00814] [BUG] Segmentation fault (latest CVS)"
on 99/09/23, Jonathan Aseltine <aseltine / cs.umass.edu> writes:
|The following code will reproduce the bug:
|
|while gets
| $_.gsub!(/[^\w\s]/, " %& ")
| print $_
|end
Thank you for finding a bug! This patch will improve the situation
hopefully.
--- /tmp/regex.c Wed Sep 22 00:35:15 1999
+++ regex.c Fri Sep 24 16:25:59 1999
@@ -2877,7 +2877,7 @@
break;
}
for (j = 0,c = 0;j < (int)size; j++) {
- int cc = EXTRACT_MBC(&p[j*8]);
+ unsigned int cc = EXTRACT_MBC(&p[j*8]);
beg = WC2MBC1ST(cc);
while (c < beg) {
if (ismbchar(c))