Browse Source

workaround for VC8

David Rose 19 years ago
parent
commit
633a4f0d1e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dtool/src/prc/globPattern.cxx

+ 1 - 1
dtool/src/prc/globPattern.cxx

@@ -184,7 +184,7 @@ matches_substr(string::const_iterator pi, string::const_iterator pend,
     // A special exception: we allow ci to reach the end before pi,
     // only if pi is one character before the end and that last
     // character is '*'.
-    if ((ci == cend) && (pi + 1 == pend) && (*pi) == '*') {
+    if ((ci == cend) && (std::distance(pi, pend) == 1) && (*pi) == '*') {
       return true;
     }
     return (pi == pend && ci == cend);