mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 00:10:19 +02:00
* TDOMText.SplitText should check that its argument isn't readonly before doing anything else.
Since the procedure still raises NO_MODIFICATION_ERR later (while inserting new node to the parent), the testsuite wasn't able to detect this bug, causing the old node to be modified and the new node to leak :/ git-svn-id: trunk@13144 -
This commit is contained in:
parent
54b475a68b
commit
66c0840bce
@ -2399,6 +2399,7 @@ end;
|
||||
|
||||
function TDOMText.SplitText(offset: LongWord): TDOMText;
|
||||
begin
|
||||
Changing;
|
||||
if offset > Length then
|
||||
raise EDOMIndexSize.Create('Text.SplitText');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user