User forums > Nightly builds

The 11 october 2006 build is out.

<< < (7/9) > >>

killerbot:
When I do it like Tiwag said, I can reproduce it also.

thomas:
Using the artoj's snippet, I can reproduce it in 3049, but not in 3074.

Tiwag's example fails in both revisions, but only if you are at the very end of the file (i.e. if you have a closing curly brace, it does not fail).

thomas:

--- Code: ---Index: nativeparser.cpp
===================================================================
--- nativeparser.cpp (revision 3074)
+++ nativeparser.cpp (working copy)
@@ -650,6 +650,10 @@
     {
         ++blockStart; // skip {
         int blockEnd = ed->GetControl()->GetCurrentPos();
+
+        if(blockStart >= blockEnd)
+            return false;
+
         wxString buffer = ed->GetControl()->GetTextRange(blockStart, blockEnd);
         buffer.Trim();
         if (!buffer.IsEmpty() && !parser->ParseBuffer(buffer, false, false, true))
--- End code ---

artoj:

--- Quote from: thomas on October 13, 2006, 11:04:08 am ---<snip>

--- End quote ---

Hmm... I applied your patch and the assert seems to be fixed, but:


--- Code: ---#include <iostream>

class TestClass
{
public:
TestClass();
~TestClass();
int TestMethod() { return 0; }
};

int main() {
TestClass* t = new TestClass();
|
return 0;
}

--- End code ---

If I replace the pipe symbol with "t->" the code completion does not work (but I guess this is a different bug). If I again move the opening brace to new line, it works as expected.

killerbot:

--- Quote from: thomas on October 13, 2006, 11:04:08 am ---
--- Code: ---Index: nativeparser.cpp
===================================================================
--- nativeparser.cpp (revision 3074)
+++ nativeparser.cpp (working copy)
@@ -650,6 +650,10 @@
     {
         ++blockStart; // skip {
         int blockEnd = ed->GetControl()->GetCurrentPos();
+
+        if(blockStart >= blockEnd)
+            return false;
+
         wxString buffer = ed->GetControl()->GetTextRange(blockStart, blockEnd);
         buffer.Trim();
         if (!buffer.IsEmpty() && !parser->ParseBuffer(buffer, false, false, true))
--- End code ---

--- End quote ---

will this be committed ?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version