]> git.eshelyaron.com Git - dict.git/commitdiff
Fix edge case in error code detection
authorEshel Yaron <me@eshelyaron.com>
Sat, 6 May 2023 19:17:59 +0000 (22:17 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sat, 6 May 2023 19:17:59 +0000 (22:17 +0300)
dict.el

diff --git a/dict.el b/dict.el
index 7f87434173ba3b40a2b243486ac4f941cfc68f30..16f20d56392882df0fbce37f072e8a2feb4947ad 100644 (file)
--- a/dict.el
+++ b/dict.el
@@ -117,7 +117,9 @@ beginning of a buffer with the server's response."
                 (save-excursion
                   (goto-char (point-min))
                   (cond
-                   ((search-forward "\r\n5" nil t) ; error code
+                   ((or (looking-at "^5")
+                        (search-forward "\r\n5" nil t))
+                    ;; server replied with an error code
                     (setq done t))
                    ((search-forward "\r\n.\r\n" nil t)
                     (goto-char (point-min))