Do not store character 30. I made a test at my CS department

and at least one user use this char in a file name. Older
locate implementions core'd.
This commit is contained in:
Wolfram Schneider 1996-10-27 19:04:27 +00:00
parent c85a5ef04c
commit c83667e68c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19213

View File

@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: locate.code.c,v 1.5 1996/08/31 14:51:18 wosch Exp $
* $Id: locate.code.c,v 1.6 1996/10/13 01:44:28 wosch Exp $
*/
#ifndef lint
@ -176,6 +176,13 @@ main(argc, argv)
/* remove newline */
for (cp = path; *cp != '\0'; cp++) {
#ifndef LOCATE_CHAR30
/* old locate implementations core'd for char 30 */
if (*cp == SWITCH)
*cp = '?';
else
#endif /* !LOCATE_CHAR30 */
/* chop newline */
if (*cp == '\n')
*cp = '\0';