X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Ftape.c;h=f7a8a10211379408d6e58d4b5d2f5668b911fd78;hp=ee5c72fc35392003c72bd8e560219afc38a4ed1b;hb=5bbb0926a5e765575c199573ea3b3d0f5ecd99a2;hpb=e7850aac218f2c009303b0a65903c54157139d0c diff --git a/restore/tape.c b/restore/tape.c index ee5c72f..f7a8a10 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -46,7 +46,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.40 2001/06/18 10:58:28 stelian Exp $"; + "$Id: tape.c,v 1.41 2001/07/18 11:46:31 stelian Exp $"; #endif /* not lint */ #include @@ -452,8 +452,11 @@ again: return; } if (buf[0] != '\n') { + char *pos; (void) strncpy(magtape, buf, sizeof(magtape)); magtape[sizeof(magtape) - 1] = '\0'; + if ((pos = strchr(magtape, '\n'))) + magtape[pos - magtape] = '\0'; } } #ifdef RRESTORE