Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

ScriptingManager

(1/1)

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

--- End code ---

MortenMacFly:

--- Quote from: sethjackson on July 24, 2006, 11:19:41 pm ---Anyways here is the patch. :)

--- End quote ---
...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.

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. :)

--- End quote ---
...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.

--- End quote ---

Sure. :)

Navigation

[0] Message Index

Go to full version