summaryrefslogtreecommitdiff
path: root/src/passes/PostEmscripten.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/PostEmscripten.cpp')
-rw-r--r--src/passes/PostEmscripten.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/PostEmscripten.cpp b/src/passes/PostEmscripten.cpp
index 39bc3e889..6dc32eaa8 100644
--- a/src/passes/PostEmscripten.cpp
+++ b/src/passes/PostEmscripten.cpp
@@ -317,7 +317,7 @@ struct PostEmscripten : public Pass {
// The first operand is the function pointer index, which must be
// constant if we are to optimize it statically.
if (auto* index = curr->operands[0]->dynCast<Const>()) {
- size_t indexValue = index->value.geti32();
+ size_t indexValue = index->value.getInteger();
if (indexValue >= flatTable.names.size()) {
// UB can lead to indirect calls to invalid pointers.
return;