Fix regex bug in executeRPNCalculation function

This commit is contained in:
kwaroran
2024-04-25 04:00:53 +09:00
parent bf15c7d860
commit 45a9068e58

View File

@@ -69,7 +69,7 @@ function calculateRPN(expression:string) {
}
function executeRPNCalculation(text:string) {
text = text.replace(/\$([a-zA-Z0-9_]+)/, (_, p1) => {
text = text.replace(/\$([a-zA-Z0-9_]+)/g, (_, p1) => {
const v = getChatVar(p1)
const parsed = parseFloat(v)
if(isNaN(parsed)){