Skip to content

Commit ab0e8e9

Browse files
committed
Fix issues with call function invocation
1 parent c624d6e commit ab0e8e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/eval.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ namespace Sass {
835835

836836
std::string name(Util::normalize_underscores(c->name()));
837837
std::string full_name(name + "[f]");
838-
Arguments* args = c->arguments();
838+
Arguments* args = SASS_MEMORY_NEW(ctx.mem, Arguments, *c->arguments());
839839

840840
// handle call here if valid arg
841841
// otherwise we eval arguments to early
@@ -1376,6 +1376,7 @@ namespace Sass {
13761376
Expression* Eval::operator()(Arguments* a)
13771377
{
13781378
Arguments* aa = SASS_MEMORY_NEW(ctx.mem, Arguments, a->pstate());
1379+
if (a->length() == 0) return aa;
13791380
for (size_t i = 0, L = a->length(); i < L; ++i) {
13801381
Argument* arg = static_cast<Argument*>((*a)[i]->perform(this));
13811382
if (!(arg->is_rest_argument() || arg->is_keyword_argument())) {

0 commit comments

Comments
 (0)