Commit ee5342e4 authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

richedit: Prevent assertion failure when streaming out nested tables.

The table properties are streamed out at the start of the table for non-nested tables, and at the end of the table for nested tables. The assertion caught the fact that I didn't get the start of the table row for nested tables before trying to stream out the properties. The call to ME_GetTableRowStart will handle both of these cases by getting the table row start paragraph and asserting that it is found. This call was also the reason for removing the const qualifier on one of the parameters.
parent fac8e957
......@@ -286,7 +286,7 @@ ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun,
static BOOL
ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream,
const ME_DisplayItem *para)
ME_DisplayItem *para)
{
ME_DisplayItem *cell;
char props[STREAMOUT_BUFFER_SIZE] = "";
......@@ -294,7 +294,7 @@ ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream,
if (!ME_StreamOutPrint(pStream, "\\trowd"))
return FALSE;
if (!editor->bEmulateVersion10) { /* v4.1 */
assert(para->member.para.nFlags & MEPF_ROWSTART);
para = ME_GetTableRowStart(para);
cell = para->member.para.next_para->member.para.pCell;
assert(cell);
do {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment