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;