Bidmaron
December 6th, 2017, 04:35
While testing edge cases in my extension, I discovered that if you call StringManager.evalDiceMathExpression as follows that FG will fatally crash:
ocal sTest="1";
local nResult=StringManager.evalDiceMathExpression(sTest );
Easy to prevent with:
local nResult;
if StringManager.isNumberString(sTest) then
nResult=tonumber(sTest);
else
nResult=StringManager.evalDiceMathExpression(sTest );
end
ocal sTest="1";
local nResult=StringManager.evalDiceMathExpression(sTest );
Easy to prevent with:
local nResult;
if StringManager.isNumberString(sTest) then
nResult=tonumber(sTest);
else
nResult=StringManager.evalDiceMathExpression(sTest );
end