From 0524a7d70377d5cabc0382bd6dbd376b83df6420 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 12 Jan 2017 11:55:38 +0100 Subject: [PATCH] more restrictive regex --- src/solidity/decodeInfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solidity/decodeInfo.js b/src/solidity/decodeInfo.js index 77b79458eb..e5682491f7 100644 --- a/src/solidity/decodeInfo.js +++ b/src/solidity/decodeInfo.js @@ -160,7 +160,7 @@ function enumType (type, stateDefinitions, contractName) { * @return {Object} returns decoded info about the current type: { storageBytes, typeName, members} */ function struct (type, stateDefinitions, contractName) { - var match = type.match(/struct (.*?)( storage ref| storage pointer| memory| calldata)?$/) + var match = type.match(/struct (\S*?)( storage ref| storage pointer| memory| calldata)?$/) if (match && match.length > 2) { var memberDetails = getStructMembers(match[1], stateDefinitions, contractName) // type is used to extract the ast struct definition if (!memberDetails) return null