Skip to content

Commit

Permalink
Fix handling of negative results in module operator
Browse files Browse the repository at this point in the history
Fixes sass#1029
  • Loading branch information
mgreter committed Jun 1, 2015
1 parent efbb288 commit 81a373b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ namespace Sass {
inline double sub(double x, double y) { return x - y; }
inline double mul(double x, double y) { return x * y; }
inline double div(double x, double y) { return x / y; } // x/0 checked by caller
inline double mod(double x, double y) { return abs(fmod(x, y)); } // x/0 checked by caller

typedef double (*bop)(double, double);
bop ops[Binary_Expression::NUM_OPS] = {
0, 0, // and, or
0, 0, 0, 0, 0, 0, // eq, neq, gt, gte, lt, lte
add, sub, mul, div, fmod
add, sub, mul, div, mod
};

Eval::Eval(Expand& exp)
Expand Down

0 comments on commit 81a373b

Please sign in to comment.