It happens because wxIsdigit() treats "²" and "³" as digit on XP.
This leads to an endless loop in "tokenizer.cpp" (in "DoGetToken()"), because both characters are not in the list of characters that get filtered out.
I can provide two patches:
The first one puts both characters to the list used by CharInString in "Do GetToken()", but that would make the behaviour different on different systems and I think that's not good. And in fact "²" and "³" are not really digits, and therefore should not be used in code.
The second patch filters out both characters and treats them as normal characters. That leads to the same behaviour on linux, w2k and winxp.
The characters can't be used directly in source-code, instead their ascii-code has to be used.
First patch (not really good, but works):
Index: src/plugins/codecompletion/parser/tokenizer.cpp
===================================================================
--- src/plugins/codecompletion/parser/tokenizer.cpp (revision 5106)
+++ src/plugins/codecompletion/parser/tokenizer.cpp (working copy)
@@ -560,7 +560,10 @@
else if (wxIsdigit(CurrentChar()))
{
// numbers
- while (NotEOF() && CharInString(CurrentChar(), _T("0123456789.abcdefABCDEFXxLl")))
+ wxString tmp=_T("0123456789.abcdefABCDEFXxLl");
+ tmp << wxChar(178);
+ tmp << wxChar(179);
+ while (NotEOF() && CharInString(CurrentChar(), tmp))
MoveToNextChar();
if (IsEOF())
return wxEmptyString;
Second patch (better):
Index: src/plugins/codecompletion/parser/tokenizer.cpp
===================================================================
--- src/plugins/codecompletion/parser/tokenizer.cpp (revision 5106)
+++ src/plugins/codecompletion/parser/tokenizer.cpp (working copy)
@@ -557,6 +557,11 @@
m_Str = m_Buffer.Mid(start, m_TokenIndex - start);
m_IsOperator = m_Str.IsSameAs(TokenizerConsts::operator_str);
}
+ else if (c == 178 || c == 179)
+ {
+ m_Str = c;
+ MoveToNextChar();
+ }
else if (wxIsdigit(CurrentChar()))
{
// numbers
Both patches work on linux and windows.