Fix a silly bug where MAXPATHLEN was subtracted from the string length rather

than the other way around!
Submitted by:	Elmar Bartel <bartel@informatik.tu-muenchen.de>
This commit is contained in:
Jordan K. Hubbard 1995-10-24 13:46:35 +00:00
parent adc1189458
commit abdec3e35c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11770

View File

@ -539,8 +539,8 @@ rawname(cp)
*dp = '\0';
(void)strncpy(rawbuf, cp, MAXPATHLEN - 1);
*dp = '/';
(void)strncat(rawbuf, "/r", strlen(rawbuf) - (MAXPATHLEN - 1));
(void)strncat(rawbuf, dp + 1, strlen(rawbuf) - (MAXPATHLEN - 1));
(void)strncat(rawbuf, "/r", MAXPATHLEN-1 - strlen(rawbuf));
(void)strncat(rawbuf, dp + 1, MAXPATHLEN-1 - strlen(rawbuf));
return (rawbuf);
}