This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH for small bug in scan_bin
authorPaul Marquess <paul.marquess@btinternet.com>
Thu, 22 Apr 1999 23:12:08 +0000 (00:12 +0100)
committerGurusamy Sarathy <gsar@cpan.org>
Mon, 10 May 1999 03:12:37 +0000 (03:12 +0000)
Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB29C6B45@mbtlipnt02.btlabs.bt.co.uk>

p4raw-id: //depot/perl@3354

util.c

diff --git a/util.c b/util.c
index 31e9c39..d69b084 100644 (file)
--- a/util.c
+++ b/util.c
@@ -2440,7 +2440,7 @@ scan_bin(char *start, I32 len, I32 *retlen)
       retval = n | (*s++ - '0');
       len--;
     }
-    if (len && (*s >= '2' || *s <= '9')) {
+    if (len && (*s >= '2' && *s <= '9')) {
       dTHR;
       if (ckWARN(WARN_UNSAFE))
           warner(WARN_UNSAFE, "Illegal binary digit '%c' ignored", *s);