From ced036708f9507febfc798c9d790d48842f7b9fa Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Wed, 13 Apr 2011 11:45:16 +0400 Subject: [PATCH] When searching for a string buffer, use the key as a substring. The dfincremental ui does not allow entering strings with trailing whitespace, and anyway sometimes it is difficult to guess how a GUI string actually ends. Therefore it is probably more generic to search for buffers that simply begin with the entered string. --- tools/supported/SegmentedFinder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/supported/SegmentedFinder.h b/tools/supported/SegmentedFinder.h index 198d4e082..052cab258 100644 --- a/tools/supported/SegmentedFinder.h +++ b/tools/supported/SegmentedFinder.h @@ -529,7 +529,7 @@ bool findString (SegmentedFinder* s, uint32_t *addr, const char * compare ) bool findStrBuffer (SegmentedFinder* s, uint32_t *addr, const char * compare ) { - if(strcmp((const char *)addr, compare) == 0) + if(memcmp((const char *)addr, compare, strlen(compare)) == 0) return true; return false; }