summaryrefslogtreecommitdiff
path: root/src/ast/bits.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-08-02 14:47:05 -0700
committerGitHub <noreply@github.com>2017-08-02 14:47:05 -0700
commitde15161e110f26212095c5cf4faf2e3668d2531b (patch)
tree915e18978f4b554d0479b568378a425ec5b042ee /src/ast/bits.h
parent5a07a930ad51003411b2bc827ea9bf08728ecc5a (diff)
parent6d686bd1a5b3610ad49fd607ae5e49c70410af51 (diff)
downloadbinaryen-de15161e110f26212095c5cf4faf2e3668d2531b.tar.gz
binaryen-de15161e110f26212095c5cf4faf2e3668d2531b.tar.bz2
binaryen-de15161e110f26212095c5cf4faf2e3668d2531b.zip
Merge pull request #1119 from WebAssembly/fuzz-2
More fun fuzz fixes
Diffstat (limited to 'src/ast/bits.h')
-rw-r--r--src/ast/bits.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ast/bits.h b/src/ast/bits.h
index 11cf7b06d..0aee50ffe 100644
--- a/src/ast/bits.h
+++ b/src/ast/bits.h
@@ -51,7 +51,8 @@ struct Bits {
WASM_UNREACHABLE();
}
- static Index getEffectiveShifts(Const* amount) {
+ static Index getEffectiveShifts(Expression* expr) {
+ auto* amount = expr->cast<Const>();
if (amount->type == i32) {
return getEffectiveShifts(amount->value.geti32(), i32);
} else if (amount->type == i64) {