From 3bcb4ff810b9250e12be89156c62497f183648c9 Mon Sep 17 00:00:00 2001 From: normal Date: Thu, 30 Aug 2018 03:24:55 +0000 Subject: [PATCH] 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 --- hrtime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hrtime.h b/hrtime.h index bf606d5fb1..f133bdb1ac 100644 --- a/hrtime.h +++ b/hrtime.h @@ -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