aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-30 09:01:24 +0000
committerDavid Robillard <d@drobilla.net>2010-12-30 09:01:24 +0000
commit64ad48b31e605c962022538eb02ebf6977fc2483 (patch)
tree37c844c314d9f3f9f25cdc6e251b0eb41953a3a9 /src
parent7b810b8a5fa6abc9765fc9c07b1ccb7a4e5e09b6 (diff)
downloadresp-64ad48b31e605c962022538eb02ebf6977fc2483.tar.gz
resp-64ad48b31e605c962022538eb02ebf6977fc2483.tar.bz2
resp-64ad48b31e605c962022538eb02ebf6977fc2483.zip
Fix crash at expand phase when def contains no body.
git-svn-id: http://svn.drobilla.net/resp/resp@376 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src')
-rw-r--r--src/expand.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/expand.cpp b/src/expand.cpp
index e5e3255..68904a9 100644
--- a/src/expand.cpp
+++ b/src/expand.cpp
@@ -65,14 +65,13 @@ expand_def(PEnv& penv, const AST* exp, void* arg)
for (++j; j != pat->end(); ++j)
argsExp.push_back(*j);
argsExp.head->loc = exp->loc;
- const AST* body = *(++i);
List fnExp;
fnExp.push_back(penv.sym("fn"));
fnExp.push_back(argsExp.head);
for (; i != tup->end(); ++i)
fnExp.push_back(*i);
- fnExp.head->loc = body->loc;
+ fnExp.head->loc = exp->loc;
List ret;
ret.push_back(tup->fst());