From ffec6144123b3d4fdd40be1d8d130f60cb2594d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gustavo=20Andr=C3=A9=20dos=20Santos=20Lopes?= Date: Sat, 28 Apr 2012 16:32:44 +0100 Subject: [PATCH] Fix build on MS Windows --- ext/standard/pack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/standard/pack.c b/ext/standard/pack.c index a21d41bda7..61228a63df 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -719,7 +719,8 @@ PHP_FUNCTION(unpack) case 'Z': { /* Z will strip everything after the first null character */ char pad = '\0'; - int len = inputlen - inputpos; /* Remaining string */ + int s, + len = inputlen - inputpos; /* Remaining string */ /* If size was given take minimum of len and size */ if ((size >= 0) && (len > size)) { @@ -729,7 +730,7 @@ PHP_FUNCTION(unpack) size = len; /* Remove everything after the first null */ - int s = 0; + s = 0; while (s++ <= len) { if (input[inputpos + s] == pad) break; -- 2.50.1