From f92606491c7b5d68a44b4f9ee502b9123826f796 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 5 Jun 2019 15:04:18 +0200 Subject: [PATCH] speller: when something goes wrong with 'sort', do not blame 'spell' That is, check the exit status of 'sort' before the one of 'spell'. --- src/text.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/text.c b/src/text.c index 520ca639..a0e503e7 100644 --- a/src/text.c +++ b/src/text.c @@ -2492,14 +2492,14 @@ const char *do_int_speller(const char *tempfile_name) waitpid(pid_sort, &sort_status, 0); waitpid(pid_uniq, &uniq_status, 0); - if (WIFEXITED(spell_status) == 0 || WEXITSTATUS(spell_status)) - return _("Error invoking \"spell\""); + if (WIFEXITED(uniq_status) == 0 || WEXITSTATUS(uniq_status)) + return _("Error invoking \"uniq\""); if (WIFEXITED(sort_status) == 0 || WEXITSTATUS(sort_status)) return _("Error invoking \"sort -f\""); - if (WIFEXITED(uniq_status) == 0 || WEXITSTATUS(uniq_status)) - return _("Error invoking \"uniq\""); + if (WIFEXITED(spell_status) == 0 || WEXITSTATUS(spell_status)) + return _("Error invoking \"spell\""); /* When all went okay. */ return NULL;