summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-09-21 17:59:50 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-21 18:01:17 -0700
commit740e36eab98d679387fea60cd642591a69ce809f (patch)
treeb7b14f1899ffe39a7562007474a58948685146c8 /src
parent32fbcf2d042292860e6c0a64e82becefe585fb6f (diff)
downloadbinaryen-740e36eab98d679387fea60cd642591a69ce809f.tar.gz
binaryen-740e36eab98d679387fea60cd642591a69ce809f.tar.bz2
binaryen-740e36eab98d679387fea60cd642591a69ce809f.zip
fix use of endOfFunction in an uninitialized state in wasm-binary
Diffstat (limited to 'src')
-rw-r--r--src/wasm-binary.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 9dd0d60d6..bbfde5b21 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -1567,7 +1567,7 @@ public:
std::vector<Function*> functions; // we store functions here before wasm.addFunction after we know their names
std::map<Index, std::vector<Call*>> functionCalls; // at index i we have all calls to the defined function i
Function* currFunction = nullptr;
- size_t endOfFunction;
+ Index endOfFunction = -1; // before we see a function (like global init expressions), there is no end of function to check
void readFunctions() {
if (debug) std::cerr << "== readFunctions" << std::endl;