File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -465,9 +465,8 @@ u32 CUILines::GetColorFromText(const xr_string& str)const
465465
466466 begin = str.find (BEGIN);
467467 end = str.find (END, begin);
468- R_ASSERT2 (npos != begin, " CUISubLine::GetColorFromText -- can't find beginning tag %c[" );
469- R_ASSERT2 (npos != end, " CUISubLine::GetColorFromText -- can't find ending tag ]" );
470-
468+ if (begin == npos || end == npos)
469+ return m_dwTextColor;
471470 // try default color
472471 if (npos != str.find (" %c[default]" , begin, end - begin))
473472 return m_dwTextColor;
@@ -484,11 +483,8 @@ u32 CUILines::GetColorFromText(const xr_string& str)const
484483 comma1_pos = str.find (" ," , begin);
485484 comma2_pos = str.find (" ," , comma1_pos + 1 );
486485 comma3_pos = str.find (" ," , comma2_pos + 1 );
487-
488- R_ASSERT2 (npos != comma1_pos, " CUISubLine::GetColorFromText -- can't find first comma" );
489- R_ASSERT2 (npos != comma2_pos, " CUISubLine::GetColorFromText -- can't find second comma" );
490- R_ASSERT2 (npos != comma3_pos, " CUISubLine::GetColorFromText -- can't find third comma" );
491-
486+ if (comma1_pos == npos || comma2_pos == npos || comma3_pos == npos)
487+ return m_dwTextColor;
492488
493489 u32 a, r, g, b;
494490 xr_string single_color;
You can’t perform that action at this time.
0 commit comments