From 77008711c8e59eab5352f0982dc69e776160d6c9 Mon Sep 17 00:00:00 2001 From: Marcel Greter Date: Fri, 6 May 2016 15:32:13 +0200 Subject: [PATCH] Fix segfault with calc prefix and underscore vs hyphen --- src/eval.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eval.cpp b/src/eval.cpp index 8e73bdf9bf..4631bec7ec 100644 --- a/src/eval.cpp +++ b/src/eval.cpp @@ -828,7 +828,7 @@ namespace Sass { Backtrace here(backtrace(), c->pstate(), ", in function `" + c->name() + "`"); exp.backtrace_stack.push_back(&here); // eval the body if user-defined or special, invoke underlying CPP function if native - if (body && !Prelexer::re_special_fun(c->name().c_str())) { result = body->perform(this); } + if (body && !Prelexer::re_special_fun(name.c_str())) { result = body->perform(this); } else if (func) { result = func(fn_env, *env, ctx, def->signature(), c->pstate(), backtrace()); } if (!result) error(std::string("Function ") + c->name() + " did not return a value", c->pstate()); exp.backtrace_stack.pop_back();