diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index adc9362..b2db52a 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1505,8 +1505,6 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre int nOfs, nChars; ME_DisplayItem *pCell; - para = parser.tableDef->tableRowStart; - parser.rtfMinor = rtfRow; /* Complete the table row before deleting it. * By doing it this way we will have the current paragraph format set @@ -1514,14 +1512,14 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre * will be added for this change to the current paragraph format. */ if (parser.nestingLevel > 0) { - while (parser.nestingLevel--) - ME_RTFSpecialCharHook(&parser); + while (parser.nestingLevel > 1) + ME_RTFSpecialCharHook(&parser); /* Decrements nestingLevel */ + para = parser.tableDef->tableRowStart; + ME_RTFSpecialCharHook(&parser); } else if (parser.canInheritInTbl) { + para = parser.tableDef->tableRowStart; ME_RTFSpecialCharHook(&parser); - } - if (parser.tableDef && parser.tableDef->tableRowStart && - para->member.para.nFlags & MEPF_ROWEND) - { + assert(para->member.para.nFlags & MEPF_ROWEND); para = para->member.para.next_para; } pCell = para->member.para.pCell; @@ -1531,7 +1529,8 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre nOfs = ME_GetCursorOfs(editor, 1); nChars = ME_GetCursorOfs(editor, 0) - nOfs; ME_InternalDeleteText(editor, nOfs, nChars, TRUE); - parser.tableDef->tableRowStart = NULL; + if (parser.tableDef) + parser.tableDef->tableRowStart = NULL; } } ME_CheckTablesForCorruption(editor); diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c index 8801137..f7e78b8 100644 --- a/dlls/riched20/reader.c +++ b/dlls/riched20/reader.c @@ -242,8 +242,6 @@ void RTFInit(RTF_Info *info) info->cpOutputBuffer = heap_alloc(info->dwMaxCPOutputCount); } - if (info->tableDef) - ZeroMemory(info->tableDef, sizeof(info->tableDef)); info->tableDef = NULL; info->nestingLevel = 0; info->canInheritInTbl = FALSE;