fix numerical overflow

This commit is contained in:
Kistaro Windrider 2024-02-24 22:46:30 -08:00
parent 3462815118
commit 3400325154
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -1623,7 +1623,7 @@ function ggwp:av()
font_monogram() font_monogram()
local score_pct = 100 local score_pct = 100
if seq.max_score ~= 0 then if seq.max_score ~= 0 then
score_pct = seq.score*100\seq.max_score score_pct = seq.score/seq.max_score*100\1
end end
if (score_pct == 0 and seq.score > 0) score_pct = 1 if (score_pct == 0 and seq.score > 0) score_pct = 1
self.score_pct = "\^w\^t"..tostr(score_pct).."%" self.score_pct = "\^w\^t"..tostr(score_pct).."%"