branch: externals/hiddenquote
commit 4015255b1f990f7efe9f2806dd314957af9ee7d9
Author: Mauro Aranda <[email protected]>
Commit: Mauro Aranda <[email protected]>
Guard against empty answers vector
* hiddenquote.el (hiddenquote-grid-value-create): Don't fail if the
answers vector is empty.
(hiddeqnuote-hidden-quote-puzzle): Fix typo.
---
hiddenquote.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hiddenquote.el b/hiddenquote.el
index 49b16a920b..d2a905ed89 100644
--- a/hiddenquote.el
+++ b/hiddenquote.el
@@ -516,7 +516,7 @@ It has to be of the form ARR1,ARR2")
:type string
:custom string
:documentation
- "The subject for the puzzle (e.g., general, chemistry, etc.")
+ "The subject for the puzzle (e.g., general, chemistry, etc.)")
;; Not part of ipuz.
(file :initarg :file
:initform ""
@@ -869,7 +869,8 @@ the :tag, and use the description slot to build the :doc."
:hiddenquote-word-number i
:hiddenquote-word-length (aref lengths i)
:value (if (and (oref puzzle saved)
- (oref (oref puzzle saved) answers))
+ (oref (oref puzzle saved) answers)
+ (> (length (oref (oref puzzle saved) answers)) 0))
(aref (oref (oref puzzle saved) answers) i)
(make-string (aref lengths i) ?\s)))
children)