[ wxwindows-Patches-1072408 ] fix ASSERT from SetEventText

SourceForge.net noreply at sourceforge.net
Sun Apr 1 08:23:26 PDT 2007


Patches item #1072408, was opened at 2004-11-24 13:17
Message generated for change (Comment added) made by vadz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1072408&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Contrib -- STC
Group: bug fix
>Status: Pending
Resolution: None
Priority: 5
Private: No
Submitted By: Andreas Pflug (andreas_pflug)
Assigned to: Robin Dunn (robind)
Summary: fix ASSERT from SetEventText

Initial Comment:
If a multibyte char (e.g. 'ä' German a umlaut) is typed
in an empty wxStyledTextCtrl, an assert in wxString is
thrown. This results from SetEventText interpreting its
text argument as sequence of characters, while actually
it's a sequence of _styled_ characters so every second
char needs to be skipped. 

The attached patch fixes this.


----------------------------------------------------------------------

>Comment By: Vadim Zeitlin (vadz)
Date: 2007-04-01 17:23

Message:
Logged In: YES 
user_id=71618
Originator: NO

We can't apply this if it breaks non-Unicode build. Any ideas about how to
really fix this bug would be welcome.

----------------------------------------------------------------------

Comment By: Otto Wyss (wyo)
Date: 2004-12-03 19:17

Message:
Logged In: YES 
user_id=400476

Maybe it always 2 chars in unicode but one otherwise. Look
once into ScintillaBase::AutoCompleteCompleted and check
scn.text. It's the only occurence I've found. I don't use
auto complete maybe I should add it.

----------------------------------------------------------------------

Comment By: Andreas Pflug (andreas_pflug)
Date: 2004-12-03 11:49

Message:
Logged In: YES 
user_id=790207

This could mean that SetEventText is sometimes called with
styled chars, and sometimes with standard chars. I don't
have non-unicode running, so I can't backtrace the problem.

----------------------------------------------------------------------

Comment By: Otto Wyss (wyo)
Date: 2004-12-03 10:20

Message:
Logged In: YES 
user_id=400476

Sorry, this patch asserts with a address violation in none 
unicode mode

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1072408&group_id=9863




More information about the wx-dev mailing list