diff options
author | Chip Salzenberg <chip@atlantic.net> | 1996-12-23 12:58:58 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1996-12-23 12:58:58 +1200 |
commit | 13826f2cf81099b832a12ff02c10a2f9d23cd6e5 (patch) | |
tree | 24a90e6abe01e18770f4fe58907acc2f6a5ece4a /universal.c | |
parent | d97d40b5b09d6d89f9fc39d5d51be2de4320c77b (diff) | |
download | perl-13826f2cf81099b832a12ff02c10a2f9d23cd6e5.tar.gz |
Fixes for Interactive Unix
(this is the same change as commit 1ab5d0547ab7398ea9e3e00b1c1b0f1f8ea0dd94, but as applied)
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/universal.c b/universal.c index 476b60d3c0..74d182d953 100644 --- a/universal.c +++ b/universal.c @@ -198,6 +198,7 @@ XS(XS_UNIVERSAL_VERSION) GV *gv; SV *sv; char *undef; + double req; if(SvROK(ST(0))) { sv = (SV*)SvRV(ST(0)); @@ -222,9 +223,9 @@ XS(XS_UNIVERSAL_VERSION) undef = "(undef)"; } - if(items > 1 && (undef || SvNV(ST(1)) > SvNV(sv))) + if (items > 1 && (undef || (req = SvNV(ST(1)), req > SvNV(sv)))) croak("%s version %s required--this is only version %s", - HvNAME(pkg),SvPV(ST(1),na),undef ? undef : SvPV(sv,na)); + HvNAME(pkg), SvPV(ST(1),na), undef ? undef : SvPV(sv,na)); ST(0) = sv; |