summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-08-02 05:41:41 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-08-02 05:41:41 +0000
commit048cfca119e459213e1be7687c50fa35815885ae (patch)
tree3cc3428f45d6f89108f999f73fb9a42b14bb9039
parent9d116dd7c895b17badf4ad422ae44da0c4df7bc2 (diff)
downloadperl-048cfca119e459213e1be7687c50fa35815885ae.tar.gz
use I32_MAX as the limit when U16_MAX > I32_MAX (for CRAY)
p4raw-id: //depot/maint-5.005/perl@1698
-rw-r--r--regcomp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index 79b1316694..f2f51a4420 100644
--- 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;