[TSimpleGraph] BUG: random characters in text
I just compiled the demo application attacched to the download, run it and add a Link line, then go to properties and put in "aaa" as text, as you click Apply or OK the text will appear but will be "aaa" + some weird chinese/japanese characters. Sometime this does not happen, but going in properties again and changing text will do.
Trying to track down the problem I got to the line inside the TGraphLink.DrawText procedure:
I can't understand what's exactly going on there, code seems to be fine, but does weird things.
Maybe the implicit cast to PChar leaves some bad character into memory without nulling the next character.
This applies to:
TSimpleGraph 2.80
Delphi XE2
Christian
Trying to track down the problem I got to the line inside the TGraphLink.DrawText procedure:
- Code: Select all
ExtTextOut(DC, TextCenter.X, TextCenter.Y, TextFlags, nil,
PChar(TextToShow), Length(TextToShow), nil);
I can't understand what's exactly going on there, code seems to be fine, but does weird things.
Maybe the implicit cast to PChar leaves some bad character into memory without nulling the next character.
This applies to:
TSimpleGraph 2.80
Delphi XE2
Christian