aboutsummaryrefslogtreecommitdiffstats
path: root/strftime.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 16:02:46 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-06 16:02:46 +0000
commit14e72b1cded783884ca2ebbefd8d46087e46f6c7 (patch)
tree6f51071510d1f3cc9109d7492e37d46e7c374c95 /strftime.c
parent387b42053f8458657c846b38fe829326654c914f (diff)
downloadruby-14e72b1cded783884ca2ebbefd8d46087e46f6c7.tar.gz
* strftime.c (rb_strftime_with_timespec): Test yday range.
[ruby-core:44088] [Bug #6247] reported by Ruby Submit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'strftime.c')
-rw-r--r--strftime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/strftime.c b/strftime.c
index b05653ffd5..83550e9a7f 100644
--- a/strftime.c
+++ b/strftime.c
@@ -363,7 +363,8 @@ rb_strftime_with_timespec(char *s, size_t maxsize, const char *format, rb_encodi
continue;
case 'j': /* day of the year, 001 - 366 */
- FMT('0', 3, "d", vtm->yday);
+ i = range(1, vtm->yday, 366);
+ FMT('0', 3, "d", (int)i);
continue;
case 'm': /* month, 01 - 12 */