summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/PerlIO/via/via.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/PerlIO/via/via.xs b/ext/PerlIO/via/via.xs
index fffa689a52..36394dd82b 100644
--- a/ext/PerlIO/via/via.xs
+++ b/ext/PerlIO/via/via.xs
@@ -247,7 +247,7 @@ PerlIOVia_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers,
else {
/* Required open method not present */
PerlIO_funcs *tab = NULL;
- const IV m = n - 1;
+ IV m = n - 1;
while (m >= 0) {
PerlIO_funcs *t =
PerlIO_layer_fetch(aTHX_ layers, m, NULL);
@@ -255,7 +255,7 @@ PerlIOVia_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers,
tab = t;
break;
}
- n--;
+ m--;
}
if (tab) {
if ((*tab->Open) (aTHX_ tab, layers, m, mode, fd, imode,