diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-23 10:50:42 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-23 10:50:42 +0000 |
commit | 3bd735314dd2d59a1f4b5c48c06cda77453a31a6 (patch) | |
tree | be7e2f40184dd39836870f81ee103b825afcdcfd /win32/win32.c | |
parent | c0e0e87b45a29c2f2e5a802dd7533994ee34dd8d (diff) |
* win32/win32.c (subtruct): check tv_sec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c index 6bd5a0694e..98cb7bb6bc 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2172,6 +2172,9 @@ do_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex, static inline int subtract(struct timeval *rest, const struct timeval *wait) { + if (rest->tv_sec < wait->tv_sec) { + return 0; + } while (rest->tv_usec < wait->tv_usec) { if (rest->tv_sec <= wait->tv_sec) { return 0; |