From d1d4442df4388bdcfd283a2cfb789ddce4834ef8 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 6 Nov 2015 10:24:02 -0800 Subject: tolerate empty string as a name --- src/wasm.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/wasm.h b/src/wasm.h index 5991f88e3..ba3c4ac45 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -893,7 +893,7 @@ public: void addFunctionType(FunctionType* curr) { Name numericName = Name::fromInt(functionTypeIndex); - if (!curr->name) { + if (curr->name.isNull()) { curr->name = numericName; } functionTypes.push_back(curr); @@ -903,7 +903,7 @@ public: } void addImport(Import* curr) { Name numericName = Name::fromInt(importIndex); - if (!curr->name) { + if (curr->name.isNull()) { curr->name = numericName; } imports.push_back(curr); @@ -913,7 +913,7 @@ public: } void addExport(Export* curr) { Name numericName = Name::fromInt(exportIndex); - if (!curr->name) { + if (curr->name.isNull()) { curr->name = numericName; } exports.push_back(curr); @@ -923,7 +923,7 @@ public: } void addFunction(Function* curr) { Name numericName = Name::fromInt(functionIndex); - if (!curr->name) { + if (curr->name.isNull()) { curr->name = numericName; } functions.push_back(curr); -- cgit v1.2.3