The following WAST test expression from [if.wast](https://github.com/WebAssembly/spec/blob/228549757b301c698c5588ec0d58b201b5777c92/test/core/if.wast#L935) miscompiles, omitting the empty else block:

```wast
(assert_invalid
  (module (func $type-else-value-empty-vs-num (result i32)
    (if (result i32) (i32.const 1) (then (i32.const 0)) (else))
  ))
  "type mismatch"
)
```

```console
$ wast2json if.wast
$ wasm-objdump -x -d if.0.wasm

if.0.wasm:	file format wasm 0x1

Section Details:

Type[1]:
 - type[0] () -> i32
Function[1]:
 - func[0] sig=0
Code[1]:
 - func[0] size=9

Code Disassembly:

000017 func[0]:
 000018: 41 01                      | i32.const 1
 00001a: 04 7f                      | if i32
 00001c: 41 00                      |   i32.const 0
 00001e: 0b                         | end
 00001f: 0b                         | end
```

WABT version: 0df6c26d2a6122afcc2c32ff6b608326258d40d9
`wast2json` miscompiles "if.wast" from the specification tests
This is a GitHub Issue
repo:wabt
owner:WebAssembly
Title : `wast2json` miscompiles "if.wast" from the specification tests
Issue date:

--- start body ---
The following WAST test expression from [if.wast](https://github.com/WebAssembly/spec/blob/228549757b301c698c5588ec0d58b201b5777c92/test/core/if.wast#L935) miscompiles, omitting the empty else block:

```wast
(assert_invalid
  (module (func $type-else-value-empty-vs-num (result i32)
    (if (result i32) (i32.const 1) (then (i32.const 0)) (else))
  ))
  "type mismatch"
)
```

```console
$ wast2json if.wast
$ wasm-objdump -x -d if.0.wasm

if.0.wasm:	file format wasm 0x1

Section Details:

Type[1]:
 - type[0] () -> i32
Function[1]:
 - func[0] sig=0
Code[1]:
 - func[0] size=9

Code Disassembly:

000017 func[0]:
 000018: 41 01                      | i32.const 1
 00001a: 04 7f                      | if i32
 00001c: 41 00                      |   i32.const 0
 00001e: 0b                         | end
 00001f: 0b                         | end
```

WABT version: 0df6c26d2a6122afcc2c32ff6b608326258d40d9
--- end body ---
