diff options
Diffstat (limited to 'src/tools/asm2wasm.cpp')
-rw-r--r-- | src/tools/asm2wasm.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/asm2wasm.cpp b/src/tools/asm2wasm.cpp index 1cf7947ce..cc9464434 100644 --- a/src/tools/asm2wasm.cpp +++ b/src/tools/asm2wasm.cpp @@ -197,11 +197,11 @@ int main(int argc, const char *argv[]) { // Set the max memory size, if requested const auto &memMax = options.extra.find("mem max"); if (memMax != options.extra.end()) { - int max = atoi(memMax->second.c_str()); - if (max >= 0) { + uint64_t max = strtoull(memMax->second.c_str(), nullptr, 10); + if (max != uint64_t(-1)) { wasm.memory.max = max / Memory::kPageSize; } else { - wasm.memory.max = Memory::kMaxSize; + wasm.memory.max = Memory::kUnlimitedSize; } } // Set the table sizes, if requested @@ -211,7 +211,7 @@ int main(int argc, const char *argv[]) { if (max >= 0) { wasm.table.max = max; } else { - wasm.table.max = Table::kMaxSize; + wasm.table.max = Table::kUnlimitedSize; } } |