summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 14:09:10 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-15 14:09:10 +0000
commit282a3cfb1cfb42b93c4bb5fe8b7392b9f8d8191e (patch)
treef363606cab15902269136eb35390baee086abdc3
parent89602ad3f05667aa44a5385644e1b6ad63276e7c (diff)
merge revision(s) 16473:
* sprintf.c (rb_f_sprintf): fixed SEGV on win32 with "% 0e" % 1.0/0.0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--sprintf.c2
-rw-r--r--version.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cf77f3465..7a810ae0ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Jun 15 23:09:00 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * sprintf.c (rb_f_sprintf): fixed SEGV on win32 with "% 0e" % 1.0/0.0.
+
Sun Jun 15 23:07:46 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* process.c (rb_f_system): set last_status when status == -1 because
diff --git a/sprintf.c b/sprintf.c
index c5334b1f9f..cf8ea20de6 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -729,6 +729,8 @@ rb_f_sprintf(argc, argv)
need = strlen(expr);
if ((!isnan(fval) && fval < 0.0) || (flags & FPLUS))
need++;
+ else if (flags & FSPACE)
+ need++;
if ((flags & FWIDTH) && need < width)
need = width;
diff --git a/version.h b/version.h
index 1ea16667b4..20b813985f 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-15"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080615
-#define RUBY_PATCHLEVEL 211
+#define RUBY_PATCHLEVEL 212
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8