From 940af5f96371c3e0aac7380b65f436886bd5f020 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 24 Feb 2006 11:41:22 +0000 Subject: [PATCH] fixed bug #1431593 - dir_reader::matches uses iterator that is at end git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4522 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/dirreader.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/dirreader.cpp b/Source/dirreader.cpp index 0c3390bb..68640c22 100644 --- a/Source/dirreader.cpp +++ b/Source/dirreader.cpp @@ -57,13 +57,13 @@ bool dir_reader::matches(const string& name, const string& spec) { break; case '*': - // double asterisk is the same as a simgle asterisk - while (*spec_itr == '*' && spec_itr != spec_end) + // double asterisk is the same as a single asterisk + while (*spec_itr == '*') { spec_itr++; - - // asterisk at the end of the spec matches the end of the name - if (spec_itr == spec_end) - return true; + // asterisk at the end of the spec matches the end of the name + if (spec_itr == spec_end) + return true; + } // remember last good name and spec for prematurely stopped asterisk last_good_spec = spec_itr;