From 25497aabb372eb3ca2b6a8cf0564c307d1f7afa7 Mon Sep 17 00:00:00 2001 From: TrollerOfHolland Date: Thu, 23 Jun 2022 01:16:41 +0200 Subject: [PATCH] ASTree.cpp bugfix on line 1757, preventing error 'front called on empty vector' --- ASTree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ASTree.cpp b/ASTree.cpp index 62bb4eb..55d9c2b 100644 --- a/ASTree.cpp +++ b/ASTree.cpp @@ -1754,7 +1754,7 @@ PycRef BuildFromCode(PycRef code, PycModule* mod) * If it's a comprehension, the only POP_TOP should be * a call to append the iter to the list. */ - if (value.type() == ASTNode::NODE_CALL) { + if (value.type() == ASTNode::NODE_CALL && !value.cast()->pparams().empty() ) { PycRef res = value.cast()->pparams().front(); stack.push(new ASTComprehension(res));