diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-23 10:39:21 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-23 10:39:21 +0000 |
commit | 743765cd3bf7a8024b950c0e4a1a36f18092623a (patch) | |
tree | 6fac31034a5e57e5ae0621024a5b2daba4a51378 /win32 | |
parent | 8b54d5812ca4d42f2fe2c53f2b29640ce22d09c3 (diff) | |
download | ruby-743765cd3bf7a8024b950c0e4a1a36f18092623a.tar.gz |
* win32/win32.c (subtruct): check tv_sec. reported by ko1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-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 5774d0c503..bcf4bd77ea 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2157,6 +2157,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; |