summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-02-13 12:16:45 -0700
committerKarl Williamson <khw@cpan.org>2017-02-13 21:24:08 -0700
commit5d382c252dbb26302398c7fe38021a0f3c06b809 (patch)
treebd27a64587a3c0fd7231f887bc46777964df9631 /mg.c
parent0aab20f283bf5c6088780bee353c6a125f50088b (diff)
downloadperl-5d382c252dbb26302398c7fe38021a0f3c06b809.tar.gz
mg.c: PL_hints is unsigned
Therefore it's dangerous to presume things fit into an IV.
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mg.c b/mg.c
index 172127c865..f15eef474b 100644
--- a/mg.c
+++ b/mg.c
@@ -944,7 +944,7 @@ Perl_magic_get(pTHX_ SV *sv, MAGIC *mg)
}
break;
case '\010': /* ^H */
- sv_setiv(sv, (IV)PL_hints);
+ sv_setuv(sv, PL_hints);
break;
case '\011': /* ^I */ /* NOT \t in EBCDIC */
sv_setpv(sv, PL_inplace); /* Will undefine sv if PL_inplace is NULL */
@@ -2737,7 +2737,7 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
PL_maxsysfd = SvIV(sv);
break;
case '\010': /* ^H */
- PL_hints = SvIV(sv);
+ PL_hints = SvUV(sv);
break;
case '\011': /* ^I */ /* NOT \t in EBCDIC */
Safefree(PL_inplace);