This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix for unpack('u') failures on OS/390
[perl5.git] / pp.c
diff --git a/pp.c b/pp.c
index 35b1552..1320486 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -3574,7 +3574,7 @@ PP(pp_unpack)
                char hunk[4];
 
                hunk[3] = '\0';
-               len = (*s++ - ' ') & 077;
+               len = uudmap[*s++] & 077;
                while (len > 0) {
                    if (s < strend && ISUUCHAR(*s))
                        a = uudmap[*s++] & 077;