mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 18:13:58 +02:00
merge rivision(s) 33685:
* win32/win32.c (unixtime_to_filetime): should check the return value of localtime(). reported by snowjail at gmail.com. [ruby-dev:44838] [Bug #5596] [Backport #5596] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
25f531a924
commit
ad837e5a12
3 changed files with 10 additions and 1 deletions
|
@ -5460,6 +5460,9 @@ unixtime_to_filetime(time_t time, FILETIME *ft)
|
|||
FILETIME lt;
|
||||
|
||||
tm = localtime(&time);
|
||||
if (!tm) {
|
||||
return -1;
|
||||
}
|
||||
st.wYear = tm->tm_year + 1900;
|
||||
st.wMonth = tm->tm_mon + 1;
|
||||
st.wDayOfWeek = tm->tm_wday;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue