diff --git a/web/app/libs/uoj-html-lib.php b/web/app/libs/uoj-html-lib.php
index 66bb094..15bb957 100644
--- a/web/app/libs/uoj-html-lib.php
+++ b/web/app/libs/uoj-html-lib.php
@@ -485,7 +485,7 @@ class JudgmentDetailsPrinter {
echo '
', 'Subtask #', $subtask_num, ': ', '
';
echo '';
- if ($this->styler->show_score) {
+ if ($this->styler->show_score && $subtask_score !== '') {
echo '';
echo ' ', $subtask_score, ' pts';
echo '
';
@@ -555,7 +555,7 @@ class JudgmentDetailsPrinter {
}
echo '';
- if ($this->styler->show_score) {
+ if ($this->styler->show_score && $test_score !== '') {
echo '';
echo ' ', $test_score, ' pts';
echo '
';