Patch #3471 2013-05-31 15:14

hsolter

check the flags exist before removing (Debug assertion)
Download
3471-check_the_flag.patch (643 bytes)
Category
Application::Bugfix
Status
Accepted
Close date
2013-06-01 10:36
Assigned to
biplab
Index: src/sdk/compilercommandgenerator.cpp
===================================================================
--- src/sdk/compilercommandgenerator.cpp    (revision 9123)
+++ src/sdk/compilercommandgenerator.cpp    (working copy)
@@ -373,7 +373,9 @@
         wxArrayString aCflags = GetArrayFromString(cFlags, wxT(" "));
         for (size_t i = 0; i < remFlags.GetCount(); ++i)
         {
-            aCflags.Remove(remFlags[i]);
+            int index = aCflags.Index(remFlags[i]);
+            if (index != wxNOT_FOUND)
+                aCflags.RemoveAt(index);
         }
         cFlags = GetStringFromArray(aCflags, wxT(" "), false);
     }
biplab 2013-06-01 10:36

Thanks for the patch.