From 62dd493865d1691b6854b583433baf3f7f50fd1b Mon Sep 17 00:00:00 2001
From: Robert Loehning <robert.loehning@nokia.com>
Date: Thu, 11 Feb 2010 19:00:11 +0100
Subject: [PATCH] Fixed crash. Passing negative values to isalnum compiled with
 MSVC crashed.

---
 src/libs/utils/filesearch.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libs/utils/filesearch.cpp b/src/libs/utils/filesearch.cpp
index 733d2039ceb..93566a6d65b 100644
--- a/src/libs/utils/filesearch.cpp
+++ b/src/libs/utils/filesearch.cpp
@@ -142,9 +142,9 @@ void runFileSearch(QFutureInterface<FileSearchResult> &future,
                     const char *beforeRegion = regionPtr - 1;
                     bool equal = true;
                     if (wholeWord &&
-                            (  isalnum(*beforeRegion)
+                            (  isalnum((unsigned char)*beforeRegion)
                             || (*beforeRegion == '_')
-                            || isalnum(*afterRegion)
+                            || isalnum((unsigned char)*afterRegion)
                             || (*afterRegion == '_'))) {
                         equal = false;
                     }
-- 
GitLab