[前][次][番号順一覧][スレッド一覧]

ruby-changes:2593

From: ko1@a...
Date: 2 Dec 2007 20:45:12 +0900
Subject: [ruby-changes:2593] akr - Ruby:r14084 (trunk): * re.c (unescape_escaped_nonascii): fix mbclen argument.

akr	2007-12-02 20:45:02 +0900 (Sun, 02 Dec 2007)

  New Revision: 14084

  Modified files:
    trunk/ChangeLog
    trunk/re.c

  Log:
    * re.c (unescape_escaped_nonascii): fix mbclen argument.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14084&r2=14083
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/re.c?r1=14084&r2=14083

Index: re.c
===================================================================
--- re.c	(revision 14083)
+++ re.c	(revision 14084)
@@ -1373,7 +1373,7 @@
     }
 
     chbuf[chlen++] = byte;
-    while (chlen < chmaxlen && chlen != mbclen(chbuf, chbuf+chmaxlen, enc)) {
+    while (chlen < chmaxlen && chlen != mbclen(chbuf, chbuf+chlen, enc)) {
         byte = read_escaped_byte(&p, end, err);
         if (byte == -1) {
             return -1;
@@ -1381,7 +1381,7 @@
         chbuf[chlen++] = byte;
     }
 
-    if (chlen != mbclen(chbuf, chbuf+chmaxlen, enc)) {
+    if (chlen != mbclen(chbuf, chbuf+chlen, enc)) {
         strcpy(err, "invalid multibyte escape");
         return -1;
     }
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 14083)
+++ ChangeLog	(revision 14084)
@@ -1,3 +1,7 @@
+Sun Dec  2 20:43:22 2007  Tanaka Akira  <akr@f...>
+
+	* re.c (unescape_escaped_nonascii): fix mbclen argument.
+
 Sun Dec  2 15:47:57 2007  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (parser_tokadd_mbchar): check insufficient multibyte char.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧]