Skip to content

Commit 6fb3ba3

Browse files
committed
Fix motion_turnleft and motion_turnright missing type casts
1 parent e1ad53e commit 6fb3ba3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/irgen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,14 +865,14 @@ class ScriptTreeGenerator {
865865
return new IntermediateStackBlock(StackOpcode.MOTION_DIRECTION_SET, {
866866
direction: new IntermediateInput(InputOpcode.OP_SUBTRACT, InputType.NUMBER, {
867867
left: new IntermediateInput(InputOpcode.MOTION_DIRECTION_GET, InputType.NUMBER),
868-
right: this.descendInputOfBlock(block, 'DEGREES')
868+
right: this.descendInputOfBlock(block, 'DEGREES').toType(InputType.NUMBER)
869869
})
870870
});
871871
case 'motion_turnright':
872872
return new IntermediateStackBlock(StackOpcode.MOTION_DIRECTION_SET, {
873873
direction: new IntermediateInput(InputOpcode.OP_ADD, InputType.NUMBER, {
874874
left: new IntermediateInput(InputOpcode.MOTION_DIRECTION_GET, InputType.NUMBER),
875-
right: this.descendInputOfBlock(block, 'DEGREES')
875+
right: this.descendInputOfBlock(block, 'DEGREES').toType(InputType.NUMBER)
876876
})
877877
});
878878

0 commit comments

Comments
 (0)