protoverse

A metaverse protocol
git clone git://jb55.com/protoverse
Log | Files | Refs | README | LICENSE

commit b011e143e82c622b370d3f704396ccf5de4bf907
parent 7d3a18e4fed1a969370443df4507eda890fc77f0
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 16 Jul 2021 10:48:34 -0700

parse_block: fix issue caught by clang

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/wasm.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wasm.c b/src/wasm.c @@ -2567,14 +2567,14 @@ static int push_label_checkpoint(struct wasm_interp *interp, struct label **labe static int parse_block(struct expr_parser *p, struct block *block, u8 end_tag) { - struct label *label; + struct label *label = NULL; if (!parse_blocktype(p->code, p->errs, &block->type)) return note_error(p->errs, p->code, "blocktype"); // if we don't have an interpreter instance, we don't care about // label resolution (NOT TRUE ANYMORE!) - if (p->interp && !push_label_checkpoint(p->interp, &label)) + if (p->interp != NULL && !push_label_checkpoint(p->interp, &label)) return note_error(p->errs, p->code, "push checkpoint"); if (label && is_label_resolved(label)) {