From 12c0cc0172591b8c6aeb4d8ce4dd1d65792645aa Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 19 Jan 2018 04:23:59 +0000 Subject: vm_args.c: fix KW_SPECIFIED_BITS_MAX * vm_args.c (KW_SPECIFIED_BITS_MAX): subtracted 1bit for FIXNUM_FLAG. [ruby-core:84921] [Bug #14373] * vm_insnhelper.c (vm_check_keyword): unsigned for bit operation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 7480815d3a..1327050b2d 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -3026,7 +3026,7 @@ vm_check_keyword(lindex_t bits, lindex_t idx, const VALUE *ep) const VALUE kw_bits = *(ep - bits); if (FIXNUM_P(kw_bits)) { - int b = FIX2INT(kw_bits); + unsigned int b = (unsigned int)FIX2ULONG(kw_bits); if ((idx < KW_SPECIFIED_BITS_MAX) && (b & (0x01 << idx))) return Qfalse; } -- cgit v1.2.3