Skip to content

Commit

Permalink
Should error when trying to string concatenate with null
Browse files Browse the repository at this point in the history
  • Loading branch information
xzyfer committed Dec 12, 2014
1 parent cf54cd8 commit ff32238
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,8 @@ namespace Sass {
case Binary_Expression::DIV: sep = "/"; break;
default: break;
}
if (ltype == Expression::NULL_VAL) error("invalid null operation: \"null plus "+quote(unquote(rstr), '"')+"\".", lhs->path(), lhs->position());
if (rtype == Expression::NULL_VAL) error("invalid null operation: \""+quote(unquote(lstr), '"')+" plus null\".", lhs->path(), lhs->position());
char q = '\0';
if (lstr[0] == '"' || lstr[0] == '\'') q = lstr[0];
else if (rstr[0] == '"' || rstr[0] == '\'') q = rstr[0];
Expand Down

0 comments on commit ff32238

Please sign in to comment.