Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6ab5dbb

Browse files
Fix for integer division of non-constants
1 parent e33697f commit 6ab5dbb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎Expression.hpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ class ExpressionOp : public Expression {
103103
}
104104
else {
105105
if (left && right) {
106+
if (op == Operator::DIV) {
107+
output << "Math.floor";
108+
}
106109
output << '(';
107110
left->emit();
108111
output << ' ' << valid_ops.at(op).first << ' ';

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /