Browse Source

empty functions must return 0

master
Martin Dørum 3 years ago
parent
commit
b11a9e66b4
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      lib/parse/parse.c

+ 5
- 0
lib/parse/parse.c View File

@@ -41,6 +41,11 @@ static int parse_function_impl(
first = 0;
}

// Empty function bodies must still return something; just return 0 (none)
if (first) {
l2_gen_push(gen, 0);
}

l2_gen_ret(gen);
return 0;
}

Loading…
Cancel
Save