zero pad decimal part of average guesses

An average of 3.04 was shown as 3.4 because the hundredths weren't
padded. Pad with parameter expansion to keep the script bash-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adamandClaude Opus 5.5 committed 2026-09-29 17:24:24 +00:00
1 parent f29d81e932
commit 8dfebaa9f8
1 file changed
+1
+1
View File
@@ -484,6 +484,7 @@ function update_stats() {
integer_part=$(( result / 100 )) integer_part=$(( result / 100 ))
decimal_part=$(( result % 100 )) decimal_part=$(( result % 100 ))
[[ ${decimal_part} -lt 10 ]] && decimal_part="0${decimal_part}"
AVERAGE="${integer_part}.${decimal_part}" AVERAGE="${integer_part}.${decimal_part}"
fi fi