Fix GENERIC_USERNAMES thinko

This commit is contained in:
Pasi Kallinen
2015-03-10 17:30:24 +02:00
parent 67aab26a83
commit f0a335da2a

View File

@@ -1337,8 +1337,9 @@ plnamesuffix()
i = (int)strlen(plname);
eptr = GENERIC_USERNAMES;
sptr = strstri(eptr, plname);
if (sptr && ((sptr == eptr && (sptr[i] == ' ' || sptr[i] == '\0'))
|| sptr[i] == ' ' || sptr[i] == '\0'))
if (sptr
&& (sptr == eptr || sptr[-1] == ' ')
&& (sptr[i] == ' ' || sptr[i] == '\0'))
*plname = '\0'; /* call askname() */
#endif