News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

ScriptingManager

Started by sethjackson, July 24, 2006, 11:19:41 PM

Previous topic - Next topic

sethjackson

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) Select

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;
     }

MortenMacFly

Quote from: sethjackson on July 24, 2006, 11:19:41 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

sethjackson

Quote from: MortenMacFly on July 24, 2006, 11:55:57 PM
Quote from: sethjackson on July 24, 2006, 11:19:41 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. :)