I found some bugs for index-error in the codeblocks.
they are very minor bugs.
see that
Index: debuggeroptionsprjdlg.cpp
===================================================================
--- debuggeroptionsprjdlg.cpp (revision 5492)
+++ debuggeroptionsprjdlg.cpp (working copy)
@@ -91,7 +91,7 @@
{
lstBox->Delete(idx);
}
- if((size_t)idx > lstBox->GetCount())
+ if((size_t)idx >= lstBox->GetCount())
{
idx--;
}
@@ -150,7 +150,7 @@
// if we renamed it, just break, there can only be one map per target
break;
}
Index: cbproject.cpp
===================================================================
--- cbproject.cpp (revision 5492)
+++ cbproject.cpp (working copy)
@@ -1972,7 +1972,7 @@
if (vt.Index(nameOrder[i]) != wxNOT_FOUND)
{
vt.Remove(nameOrder[i]);
- vt.Insert(nameOrder[i], i);
+ vt.Insert(nameOrder[i],vt.Count()<=i? vt.Count()-1:i);
}
}
}
[attachment deleted by admin]
In rev 5497 of codeblocks.
618F1513 D:\WIDE_ARM\Development\WindowsPlatform\Src\ExeProject\CodeBlocks_debug\src\devel\codeblocks.dll:618F1513 ProjectOptionsDlg::OnUpdateUI(wxUpdateUIEvent&) D:/WIDE_ARM/Development/WindowsPlatform/Src/ExeProject/CodeBlocks_debug/src/sdk/projectoptionsdlg.cpp:1031
XRCCTRL(*this, "btnExecutionDir", wxTextCtrl)->Enable(customMake);
need change code to
XRCCTRL(*this, "btnExecutionDir", wxButton)->Enable(customMake);
Fixed:
1. Path of generated files always keep $file_dir in the generated files (to be further compiled) windows.
2. Insert index need be checked.
Index: cbproject.cpp
===================================================================
--- cbproject.cpp (revision 5611)
+++ cbproject.cpp (working copy)
@@ -749,7 +749,7 @@
for (size_t i = 0; i < tool->generatedFiles.GetCount(); ++i)
{
tmp.SetFullName(tool->generatedFiles[i]);
- wxString tmps = tmp.GetFullPath();
+ wxString tmps = tmp.GetFullName();
// any macro replacements here, should also be done in
// CompilerCommandGenerator::GenerateCommandLine !!!
tmps.Replace(_T("$file_basename"), f->file.GetName()); // old way - remove later
@@ -2008,7 +2008,7 @@
if (vt.Index(nameOrder[i]) != wxNOT_FOUND)
{
vt.Remove(nameOrder[i]);
- vt.Insert(nameOrder[i], i);
+ vt.Insert(nameOrder[i],vt.Count()<=i? vt.Count()-1:i);
}
}
}
[attachment deleted by admin]
1. Path of generated files always keep $file_dir in the generated files (to be further compiled) windows.
I would love to apply that one (the other one I have already applied in my local copy), but I don't understand. Can you try to explain differently / in other words / with an example, please?!
I try explain this.
If I have a special file(test.bin) in the $(PROJECT_DIR)/Special/.
And I keyin some thing in advanced compiler option, see pic.
In this code.
- wxString tmps = tmp.GetFullPath();
I alway get auto-generated/Special/test.o.
In this follow code.
+ wxString tmps = tmp.GetFullName();
I can get auto-generated/test.o.
I think this is correct result, because I only keyin $file_name.o not $file_dir/$file_name.o in the generated files window.
I hope you can understand my mind in my poor english. :lol:
[attachment deleted by admin]
Lost initial variable.
Index: cbtool.h
===================================================================
--- cbtool.h (revision 5651)
+++ cbtool.h (working copy)
@@ -21,7 +21,7 @@
LAUNCH_VISIBLE_DETACHED
};
- cbTool() { m_MenuId = -1; }
+ cbTool() { m_LaunchOption=LAUNCH_NEW_CONSOLE_WINDOW;m_MenuId = -1; }
// getters
wxString GetName() const {return m_Name;}
wxString GetCommand() const {return m_Command;}