diff options
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Value.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Value.cpp b/Userland/Libraries/LibJS/Runtime/Value.cpp index 0317f35882..f1fa366a31 100644 --- a/Userland/Libraries/LibJS/Runtime/Value.cpp +++ b/Userland/Libraries/LibJS/Runtime/Value.cpp @@ -1020,7 +1020,7 @@ Value right_shift(GlobalObject& global_object, Value lhs, Value rhs) if (!rhs_numeric.is_finite_number()) return lhs_numeric; auto lhs_i32 = lhs_numeric.to_i32(global_object); - auto rhs_u32 = rhs_numeric.to_u32(global_object); + auto rhs_u32 = rhs_numeric.to_u32(global_object) % 32; return Value(lhs_i32 >> rhs_u32); } if (both_bigint(lhs_numeric, rhs_numeric)) { |