Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: sethjackson on July 24, 2006, 11:19:41 pm

Title: ScriptingManager
Post by: sethjackson on July 24, 2006, 11:19:41 pm
Hi I believe there is a (possible) bug in the ScriptingManager class.

On line 94 I believe someone forgot to add the extra %s to wxString::Format().

Giving three params when the function wants two is not a good idea IMO (GCC complains but still compiles).

Anyways here is the patch. :)

Code: diff
Index: src/sdk/scriptingmanager.cpp
===================================================================
--- src/sdk/scriptingmanager.cpp (revision 2779)
+++ src/sdk/scriptingmanager.cpp (working copy)
@@ -91,7 +91,7 @@
     }
     catch (SquirrelError e)
     {
-        cbMessageBox(wxString::Format(_T("Filename: %s\nError: %s"), debugName.c_str(), cbC2U(e.desc).c_str(), s_ScriptErrors.c_str()), _("Script compile error"), wxICON_ERROR);
+        cbMessageBox(wxString::Format(_T("Filename: %s\nError: %s\nDetails: %s"), debugName.c_str(), cbC2U(e.desc).c_str(), s_ScriptErrors.c_str()), _("Script compile error"), wxICON_ERROR);
         return false;
     }
Title: Re: ScriptingManager
Post by: MortenMacFly on July 24, 2006, 11:55:57 pm
Anyways here is the patch. :)
...and I was so often wondering why somethimes I see the full error message and somethimes a short note only. Thanks -> applied in SVN.
With regards, Morten.
Title: Re: ScriptingManager
Post by: sethjackson on July 24, 2006, 11:56:57 pm
Anyways here is the patch. :)
...and I was so often wondering why somethimes I see the full error message and somethimes a short note only. Thanks -> applied in SVN.
With regards, Morten.

Sure. :)