Perl 5.8.3 patches from the BS2000 port - part 2
[p5sagit/p5-mst-13.2.git] / pp_ctl.c
index ab4ab84..48e3618 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1036,9 +1036,9 @@ PP(pp_flip)
    an exception for .."0" [#18165]). AMS 20021031. */
 
 #define RANGE_IS_NUMERIC(left,right) ( \
-       SvNIOKp(left)  || !SvPOKp(left)  || \
-       SvNIOKp(right) || !SvPOKp(right) || \
-       (looks_like_number(left) && *SvPVX(left) != '0' && \
+       SvNIOKp(left)  || (SvOK(left)  && !SvPOKp(left))  || \
+       SvNIOKp(right) || (SvOK(right) && !SvPOKp(right)) || \
+       (looks_like_number(left) && SvPOKp(left) && *SvPVX(left) != '0' && \
         looks_like_number(right)))
 
 PP(pp_flop)
@@ -3580,7 +3580,7 @@ S_doparseform(pTHX_ SV *sv)
 
     /* estimate the buffer size needed */
     for (base = s; s <= send; s++) {
-       if (*s == '\n' || *s == '@' || *s == '^')
+       if (*s == '\n' || *s == '\0' || *s == '@' || *s == '^')
            maxops += 10;
     }
     s = base;