diff --git a/src/nano.c b/src/nano.c
index 7c8ea9b71b7f228c4c7b38833a2e2b67a8e72897..46a1a10b737d96bdbc5e706bbcf95ae45424b217 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -2015,7 +2015,7 @@ const char *do_alt_speller(char *tempfile_name)
 		WEXITSTATUS(alt_spell_status) != 0) {
 	char *altspell_error = NULL;
 	char *invoke_error = _("Could not invoke \"%s\"");
-	int msglen = strlenpt(invoke_error) + strlenpt(alt_speller) + 2;
+	int msglen = strlen(invoke_error) + strlen(alt_speller) + 2;
 
 	altspell_error = charalloc(msglen);
 	snprintf(altspell_error, msglen, invoke_error, alt_speller);