[hackers] [scc] [cc2-qbe] fix eval call with NULL in oreturn || Quentin Rameau
commit b3b6ae58bc48acb7f2712cdb1c64116ff2335d9f
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Tue Jul 12 18:45:33 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Tue Jul 12 18:56:57 2016 +0200
[cc2-qbe] fix eval call with NULL in oreturn
Actually pass the resulting token to eval instead of trying to parse
it again an having a null pointer.
diff --git a/cc2/parser.c b/cc2/parser.c
index 5a6d3f7..bf3fa25 100644
--- a/cc2/parser.c
+++ b/cc2/parser.c
_AT_@ -329,9 +329,8 @@ oreturn(char *token, union tokenop u)
{
Node *np = newnode(u.op);
- token = strtok(NULL, "\t\n");
- if (token)
- eval(strtok(NULL, "\t\n"));
+ if (token = strtok(NULL, "\t\n"))
+ eval(token);
if (!empty())
np->left = pop();
push(np);
Received on Mon Jul 18 2016 - 18:06:45 CEST
This archive was generated by hypermail 2.3.0
: Mon Jul 18 2016 - 18:13:31 CEST