diff options
-rw-r--r-- | src/wasm-s-parser.h | 1 | ||||
-rw-r--r-- | src/wasm.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 19c532d1d..a181278ab 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -622,6 +622,7 @@ private: while (i < s.size()) { Element& curr = *s[i]; assert(curr[0]->str() == SEGMENT); + wasm.memory.segments.emplace_back(atoi(curr[1]->c_str()), strdup(curr[2]->c_str())); i++; } } diff --git a/src/wasm.h b/src/wasm.h index b9115a51a..998c0bd50 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -803,6 +803,7 @@ public: struct Segment { size_t offset; const char* data; + Segment(size_t offset, const char *data) : offset(offset), data(data) {} }; size_t initial, max; |