Skip to content

Commit

Permalink
Fix parsing edge case for number units
Browse files Browse the repository at this point in the history
Fixes sass#1307
  • Loading branch information
mgreter committed Jul 7, 2015
1 parent b523c9e commit 28c87d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -889,12 +889,12 @@ namespace Sass {
bool nominator = true;
while (true) {
r = u.find_first_of("*/", l);
string unit(u.substr(l, r - l));
string unit(u.substr(l, r == string::npos ? r : r - l));
if (nominator) numerator_units_.push_back(unit);
else denominator_units_.push_back(unit);
if (u[r] == '/') nominator = false;
if (r == string::npos) break;
else l = r + 1;
if (u[r] == '*') l = r + 1;
else nominator = false;
}
}
concrete_type(NUMBER);
Expand Down

0 comments on commit 28c87d1

Please sign in to comment.