Skip to content

Commit

Permalink
Parse multiplication of terms
Browse files Browse the repository at this point in the history
  • Loading branch information
lL1l1 committed Aug 10, 2024
1 parent 74a6a35 commit 3d09bf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/res/scripts/luaToPhp.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function trimval($str)
$str = trim($str);

// Evaluated numbers used in fire rates like '10/10'
if (preg_match('/^((?:[0-9\.]+\w*[\/+-]\w*)*[0-9\.]+),?$/', $str, $matches))
if (preg_match('/^((?:[0-9\.]+\w*[\*\/+-]\w*)*[0-9\.]+),?$/', $str, $matches))
{
eval('$str = ' . $matches[1] . ';');
return (float)$str == (int)$str ? (int)$str : (float)$str;
Expand Down

0 comments on commit 3d09bf7

Please sign in to comment.