Commit c1a8fbbb authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

riched20: Swap check for NULL ptr and first usage (Coverity).

parent af5b4140
...@@ -156,7 +156,7 @@ static ME_String *para_num_get_str( ME_Paragraph *para, WORD num ) ...@@ -156,7 +156,7 @@ static ME_String *para_num_get_str( ME_Paragraph *para, WORD num )
{ {
/* max 4 Roman letters (representing '8') / decade + '(' + ')' */ /* max 4 Roman letters (representing '8') / decade + '(' + ')' */
ME_String *str = ME_MakeStringEmpty( 20 + 2 ); ME_String *str = ME_MakeStringEmpty( 20 + 2 );
WCHAR *p = str->szData; WCHAR *p;
static const WCHAR fmtW[] = {'%', 'd', 0}; static const WCHAR fmtW[] = {'%', 'd', 0};
static const WORD letter_base[] = { 1, 26, 26 * 26, 26 * 26 * 26 }; static const WORD letter_base[] = { 1, 26, 26 * 26, 26 * 26 * 26 };
/* roman_base should start on a '5' not a '1', otherwise the 'total' code will need adjusting. /* roman_base should start on a '5' not a '1', otherwise the 'total' code will need adjusting.
...@@ -177,6 +177,8 @@ static ME_String *para_num_get_str( ME_Paragraph *para, WORD num ) ...@@ -177,6 +177,8 @@ static ME_String *para_num_get_str( ME_Paragraph *para, WORD num )
if (!str) return NULL; if (!str) return NULL;
p = str->szData;
if ((para->fmt.wNumberingStyle & 0xf00) == PFNS_PARENS) if ((para->fmt.wNumberingStyle & 0xf00) == PFNS_PARENS)
*p++ = '('; *p++ = '(';
......
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