Skip to content
Snippets Groups Projects
Commit 37a6521d authored by stepan's avatar stepan
Browse files

Fix: bitwise shift with negative n returns NA

parent 8e5bd310
No related branches found
No related tags found
No related merge requests found
......@@ -91,14 +91,14 @@ public class BitwiseFunctions {
v = aVal ^ bVal;
break;
case SHIFTR:
if (bVal > 31) {
if (bVal > 31 || bVal < 0) {
v = RRuntime.INT_NA;
} else {
v = aVal >>> bVal;
}
break;
case SHIFTL:
if (bVal > 31) {
if (bVal > 31 || bVal < 0) {
v = RRuntime.INT_NA;
} else {
v = aVal << bVal;
......
......@@ -94,3 +94,4 @@ FastR's grid implementation does not yet support:
FastR does not plan to implement the R graphics engine display list
and related functions. However, the grid display list is implemented.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment