about summary refs log tree commit diff
path: root/src/network/hstrerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/hstrerror.c')
-rw-r--r--src/network/hstrerror.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/hstrerror.c b/src/network/hstrerror.c
index b7a6ab6c..a4d001c5 100644
--- a/src/network/hstrerror.c
+++ b/src/network/hstrerror.c
@@ -1,5 +1,6 @@
 #define _GNU_SOURCE
 #include <netdb.h>
+#include "locale_impl.h"
 
 static const char msgs[] =
 	"Host not found\0"
@@ -12,5 +13,6 @@ const char *hstrerror(int ecode)
 {
 	const char *s;
 	for (s=msgs, ecode--; ecode && *s; ecode--, s++) for (; *s; s++);
-	return *s ? s : s+1;
+	if (!*s) s++;
+	return LCTRANS_CUR(s);
 }