Browse Source

[HTML5] Fix "initial_memory" build option parsing

Fabio Alessandrelli 4 years ago
parent
commit
abb8d8e8ca
1 changed files with 5 additions and 2 deletions
  1. 5 2
      platform/javascript/detect.py

+ 5 - 2
platform/javascript/detect.py

@@ -51,8 +51,11 @@ def get_flags():
 
 def configure(env):
     if not isinstance(env["initial_memory"], int):
-        print("Initial memory must be a valid integer")
-        sys.exit(255)
+        try:
+            env["initial_memory"] = int(env["initial_memory"])
+        except:
+            print("Initial memory must be a valid integer")
+            sys.exit(255)
 
     ## Build type