mshtml: Fixed increasing buffer size logic in text range implementation.

This commit is contained in:
Jacek Caban 2008-10-13 14:50:13 -05:00 committed by Alexandre Julliard
parent d05e328db2
commit 3fc0c73159
1 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ static inline void wstrbuf_finish(wstrbuf_t *buf)
static void wstrbuf_append_len(wstrbuf_t *buf, LPCWSTR str, int len)
{
if(buf->len+len >= buf->size) {
buf->size = 2*buf->len+len;
buf->size = 2*buf->size+len;
buf->buf = heap_realloc(buf->buf, buf->size * sizeof(WCHAR));
}
@ -210,7 +210,7 @@ static void wstrbuf_append_nodetxt(wstrbuf_t *buf, LPCWSTR str, int len)
TRACE("%s\n", debugstr_wn(str, len));
if(buf->len+len >= buf->size) {
buf->size = 2*buf->len+len;
buf->size = 2*buf->size+len;
buf->buf = heap_realloc(buf->buf, buf->size * sizeof(WCHAR));
}