Do not add again the /e argument to Japanese queries

The /e argument should not be added if it has already been provided by
the user.

Closes: #1050171
This commit is contained in:
Marco d'Itri 2023-10-08 13:07:21 +02:00
parent adb4af2ddc
commit 23302dbd1d

View File

@ -742,8 +742,12 @@ char *queryformat(const char *server, const char *flags, const char *query)
/* ask for english text */
if (!isripe && (streq(server, "whois.nic.ad.jp") ||
streq(server, "whois.jprs.jp")) && japanese_locale())
streq(server, "whois.jprs.jp")) && japanese_locale()) {
/* but not if the user already added the /e flag */
char *flag = buf + strlen(buf) - 2;
if (!streq(flag, "/e"))
strcat(buf, "/e");
}
return buf;
}