diff --git a/src/scratchtocatrobat/scratch/scratch3visitor/visitorUtil.py b/src/scratchtocatrobat/scratch/scratch3visitor/visitorUtil.py index efe4d446..89ee2e99 100644 --- a/src/scratchtocatrobat/scratch/scratch3visitor/visitorUtil.py +++ b/src/scratchtocatrobat/scratch/scratch3visitor/visitorUtil.py @@ -91,7 +91,8 @@ def visitCondition(blockcontext): block = blockcontext.block if not "CONDITION" in block.inputs: log.warn("[Scratch3] Possibly empty condition in block {} ({})".format(blockcontext.block.name, blockcontext.block.opcode)) - return False + #if there is no condition block, it evaluates to true in scratch + return ['=', 0, 0] block_id = blockcontext.getInput("CONDITION")[1] conditionblock = blockcontext.get_block(block_id)