summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1996-12-23 12:58:58 +1200
committerChip Salzenberg <chip@atlantic.net>1996-12-23 12:58:58 +1200
commit13826f2cf81099b832a12ff02c10a2f9d23cd6e5 (patch)
tree24a90e6abe01e18770f4fe58907acc2f6a5ece4a /universal.c
parentd97d40b5b09d6d89f9fc39d5d51be2de4320c77b (diff)
downloadperl-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.c5
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;