diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2021-08-02 17:58:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-02 17:58:37 -0400 |
commit | f1136a48518378eb3454f5da4f05c686755b5819 (patch) | |
tree | d6cfa3e000db51b5c5c70d5a5b34f0cf95df6e4d /src | |
parent | 8aca1a3ccd1d3a0aaa72770f1412d395468713e3 (diff) | |
download | binaryen-f1136a48518378eb3454f5da4f05c686755b5819.tar.gz binaryen-f1136a48518378eb3454f5da4f05c686755b5819.tar.bz2 binaryen-f1136a48518378eb3454f5da4f05c686755b5819.zip |
Fix a bug in nominal LUB calculation (#4046)
The wrong variable was null checked, leading to segfaults.
Diffstat (limited to 'src')
-rw-r--r-- | src/wasm/wasm-type.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp index d4f38cc2c..998d1a96b 100644 --- a/src/wasm/wasm-type.cpp +++ b/src/wasm/wasm-type.cpp @@ -1512,7 +1512,7 @@ HeapType TypeBounder::lub(HeapType a, HeapType b) { } currA = nextA; } - if (currB) { + if (nextB) { if (!seen.insert(nextB).second) { return HeapType(uintptr_t(nextB)); } |