riched20: Don't write past end of buffer.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
015aae30cf
commit
5cbe3a6cb1
1 changed files with 1 additions and 1 deletions
|
@ -4309,7 +4309,7 @@ int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen,
|
|||
str = get_text( run, 0 );
|
||||
}
|
||||
/* append '\r' to the last paragraph. */
|
||||
if (run == para_end_run( para_prev( editor_end_para( editor ) ) ) && bEOP)
|
||||
if (run == para_end_run( para_prev( editor_end_para( editor ) ) ) && bEOP && buflen)
|
||||
{
|
||||
*buffer = '\r';
|
||||
buffer ++;
|
||||
|
|
Loading…
Add table
Reference in a new issue