1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

hrtime.h: fix typo in non-builtin overflow check

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2018-08-30 03:24:55 +00:00
parent 5ba404f4b0
commit 3bcb4ff810

View file

@ -64,7 +64,7 @@ rb_hrtime_mul(rb_hrtime_t a, rb_hrtime_t b)
if (__builtin_mul_overflow(a, b, &c))
return RB_HRTIME_MAX;
#else
if (b != 0 && b > RB_HRTIME_MAX / b) /* overflow */
if (b != 0 && a > RB_HRTIME_MAX / b) /* overflow */
return RB_HRTIME_MAX;
c = a * b;
#endif