From: Rafael Garcia-Suarez Date: Mon, 16 May 2005 08:58:40 +0000 (+0000) Subject: This seems to be the right thing to do to iterate over layers X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d26d6e7231f676560b7b29eac7f56fef99b265cb;p=p5sagit%2Fp5-mst-13.2.git This seems to be the right thing to do to iterate over layers p4raw-id: //depot/perl@24476 --- diff --git a/ext/PerlIO/via/via.xs b/ext/PerlIO/via/via.xs index fffa689..36394dd 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,