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

ruby-changes:36700

From: nobu <ko1@a...>
Date: Fri, 12 Dec 2014 11:25:00 +0900 (JST)
Subject: [ruby-changes:36700] nobu:r48781 (trunk): string.c: term fill

nobu	2014-12-12 11:24:51 +0900 (Fri, 12 Dec 2014)

  New Revision: 48781

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48781

  Log:
    string.c: term fill
    
    * string.c (rb_str_succ): fill wchar terminator.

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 48780)
+++ string.c	(revision 48781)
@@ -3382,7 +3382,7 @@ rb_str_succ(VALUE orig) https://github.com/ruby/ruby/blob/trunk/string.c#L3382
     memmove(s, carry, carry_len);
     slen += carry_len;
     STR_SET_LEN(str, slen);
-    sbeg[slen] = '\0';
+    TERM_FILL(&sbeg[slen], rb_enc_mbminlen(enc));
     rb_enc_str_coderange(str);
     return str;
 }

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

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