summaryrefslogtreecommitdiff
path: root/common/str.cpp
diff options
context:
space:
mode:
authorleo2006-02-22 06:02:31 +0000
committerleo2006-02-22 06:02:31 +0000
commit23861c92574c28b41673e3d70f5cf57546af3563 (patch)
treea18937a1ef3af9218608109ddaef7c62bb9f2157 /common/str.cpp
parent9f0f468a4d248f47f333dc08ef42b7538a7895ca (diff)
Fixed whole-word matching to compare subpieces correctly.
git-svn-id: http://svn.leocad.org/trunk@487 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common/str.cpp')
-rw-r--r--common/str.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/str.cpp b/common/str.cpp
index d7b59dd..5eb93cf 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -303,6 +303,9 @@ bool String::Match(const String& Expression) const
if ((End != 0) && (End != ' '))
return false;
+ if ((Result != 0) && ((GetAt(Result-1) == '_') || (GetAt(Result-1) == '~')))
+ Result--;
+
if ((Result != 0) && (GetAt(Result-1) != ' '))
return false;
}