View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0021532 | Lazarus | LCL | public | 2012-03-22 14:56 | 2012-03-23 08:25 |
Reporter | Ludo Brands | Assigned To | Paul Ishenin | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.9.30.1 (SVN) | ||||
Fixed in Version | 0.9.31 (SVN) | ||||
Summary | 0021532: [PATCH] Assigning TStrings to TMemo.Lines breaks TMemo.Lines.Names and TMemo.Lines.Values | ||||
Description | TWin32MemoStrings.Assign copies happily special characters that where not yet initialised with CheckSpecialChars. As a result assigning a TStrings to TMemo.Lines will copy an empty NameValueSeparator. Subsequent calls to TMemo.Lines.Names and TMemo.Lines.Values fail. Attached patch and test program. The patch is based on the fact that GetLBS is the only getter that calls CheckSpecialChars. Therefor moving TextLineBreakStyle := S.TextLineBreakStyle; as the first assignment will call CheckSpecialChars before copying uninitialised data. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 36239 | ||||
LazTarget | - | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
2012-03-22 14:56
|
memolines.diff (671 bytes)
Index: interfaces/win32/win32memostrings.inc =================================================================== --- interfaces/win32/win32memostrings.inc (revision 36086) +++ interfaces/win32/win32memostrings.inc (working copy) @@ -131,10 +131,10 @@ if Source is TStrings then begin // to prevent Clear and then SetText we need to use our own Assign + TextLineBreakStyle := S.TextLineBreakStyle; //put this first to call CheckSpecialChars if not done yet QuoteChar := S.QuoteChar; Delimiter := S.Delimiter; NameValueSeparator := S.NameValueSeparator; - TextLineBreakStyle := S.TextLineBreakStyle; Text := S.Text; end else |
2012-03-22 14:58
|
|
|
@Paul, please check this one. |
|
Thanks, applied. Please close if ok. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-03-22 14:56 | Ludo Brands | New Issue | |
2012-03-22 14:56 | Ludo Brands | File Added: memolines.diff | |
2012-03-22 14:56 | Ludo Brands | Widgetset | => Win32/Win64 |
2012-03-22 14:58 | Ludo Brands | File Added: testmemolines.zip | |
2012-03-22 15:02 | Zeljan Rikalo | LazTarget | => - |
2012-03-22 15:02 | Zeljan Rikalo | Note Added: 0057919 | |
2012-03-22 15:02 | Zeljan Rikalo | Assigned To | => Paul Ishenin |
2012-03-22 15:02 | Zeljan Rikalo | Status | new => assigned |
2012-03-23 04:45 | Paul Ishenin | Fixed in Revision | => 36239 |
2012-03-23 04:45 | Paul Ishenin | Status | assigned => resolved |
2012-03-23 04:45 | Paul Ishenin | Fixed in Version | => 0.9.31 (SVN) |
2012-03-23 04:45 | Paul Ishenin | Resolution | open => fixed |
2012-03-23 04:45 | Paul Ishenin | Note Added: 0057933 | |
2012-03-23 08:25 | Ludo Brands | Status | resolved => closed |