use I32_MAX as the limit when U16_MAX > I32_MAX (for CRAY)
Gurusamy Sarathy [Sun, 2 Aug 1998 05:41:41 +0000 (05:41 +0000)]
p4raw-id: //depot/maint-5.005/perl@1698

regcomp.c

index 79b1316..f2f51a4 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -306,7 +306,10 @@ study_chunk(regnode **scanp, I32 *deltap, regnode *last, scan_data_t *data, U32
 
        }
        if (OP(scan) != CURLYX) {
-           int max = (reg_off_by_arg[OP(scan)] ? I32_MAX : U16_MAX);
+           int max = (reg_off_by_arg[OP(scan)]
+                      ? I32_MAX
+                      /* I32 may be smaller than U16 on CRAYs! */
+                      : (I32_MAX < U16_MAX ? I32_MAX : U16_MAX));
            int off = (reg_off_by_arg[OP(scan)] ? ARG(scan) : NEXT_OFF(scan));
            int noff;
            regnode *n = scan;