Author Topic: ScriptingManager  (Read 4783 times)

sethjackson

  • Guest
ScriptingManager
« 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;
     }

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: ScriptingManager
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

sethjackson

  • Guest
Re: ScriptingManager
« Reply #2 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. :)