From 23861c92574c28b41673e3d70f5cf57546af3563 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 22 Feb 2006 06:02:31 +0000 Subject: Fixed whole-word matching to compare subpieces correctly. git-svn-id: http://svn.leocad.org/trunk@487 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/str.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common') 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; } -- cgit v1.2.3