summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 9d5b637d16..796ca6238d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Jun 15 23:08:29 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:06:49 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 9ac3aa9873..b811a01458 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -743,6 +743,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 0d5ef0211d..7c0707efab 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-15"
#define RUBY_VERSION_CODE 185
#define RUBY_RELEASE_CODE 20080615
-#define RUBY_PATCHLEVEL 210
+#define RUBY_PATCHLEVEL 211
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8