]> git.wh0rd.org - dump.git/blobdiff - restore/tape.c
Fix fgets bug when asking for a tape name.
[dump.git] / restore / tape.c
index bd411b945bf298467144dee8d1a297d160ee102c..7debfd16a054bae6ac243c8f1914e0279cde2505 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.101 2011/05/05 16:05:40 stelian Exp $";
+       "$Id: tape.c,v 1.102 2011/06/08 15:40:53 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -586,7 +586,7 @@ again:
                fprintf(stderr, "otherwise enter tape name (default: %s) ", magtape);
 #endif
                (void) fflush(stderr);
-               if (fgets(buf, TP_BSIZE, terminal))
+               if (!fgets(buf, TP_BSIZE, terminal))
                        exit(1);
                if (feof(terminal))
                        exit(1);