From 2f29db8333b823dd54845c3d9ea6b4998cfe0df2 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sat, 23 Feb 2008 13:04:59 +0000 Subject: [PATCH] - Fix logic --- ext/phar/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/phar/stream.c b/ext/phar/stream.c index 2863bd6100..ac6aacef90 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -273,7 +273,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, char *pat char *entry = idata->internal_file->filename, *cwd; PHAR_G(cwd_init) = 1; - if (idata->phar->is_tar || idata->phar->is_zip && idata->internal_file->filename_len == sizeof(".phar/stub.php")-1 && !strncmp(idata->internal_file->filename, ".phar/stub.php", sizeof(".phar/stub.php")-1)) { + if ((idata->phar->is_tar || idata->phar->is_zip) && idata->internal_file->filename_len == sizeof(".phar/stub.php")-1 && !strncmp(idata->internal_file->filename, ".phar/stub.php", sizeof(".phar/stub.php")-1)) { /* we're executing the stub, which doesn't count as a file */ PHAR_G(cwd_init) = 0; } else if ((cwd = strrchr(entry, '/'))) { -- 2.50.1