From 5d3203bd5c454f8383af62802dc6945cc164f6e2 Mon Sep 17 00:00:00 2001
From: Nathan Wallach <tani@technion.ac.il>
Date: Wed, 8 Jan 2025 15:48:29 +0200
Subject: [PATCH] Put back the test that either the score is less than 1 or
 that checkCorrect was set before triggering a hint when "wrong" is not a
 subroutine.

---
 macros/answers/answerHints.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/macros/answers/answerHints.pl b/macros/answers/answerHints.pl
index 91cadeb46..a332ffa56 100644
--- a/macros/answers/answerHints.pl
+++ b/macros/answers/answerHints.pl
@@ -170,7 +170,8 @@ sub AnswerHints {
 							$wrong = main::Formula($wrong);
 							$wrong = $wrong->{tree}->Compute if $wrong->{tree}{canCompute};
 						}
-						if (($ans->{ans_message} eq "" || $options{replaceMessage})
+						if (($ans->{score} < 1 || $options{checkCorrect})
+							&& ($ans->{ans_message} eq "" || $options{replaceMessage})
 							&& AnswerHints::Compare($wrong, $student, $ans, @{ $options{cmp_options} }))
 						{
 							$ans->{ans_message} = $ans->{error_message} = $message;