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
465
465
466
466
begin = str.find (BEGIN);
467
467
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;
471
470
// try default color
472
471
if (npos != str.find (" %c[default]" , begin, end - begin))
473
472
return m_dwTextColor;
@@ -484,11 +483,8 @@ u32 CUILines::GetColorFromText(const xr_string& str)const
484
483
comma1_pos = str.find (" ," , begin);
485
484
comma2_pos = str.find (" ," , comma1_pos + 1 );
486
485
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;
492
488
493
489
u32 a, r, g, b;
494
490
xr_string single_color;
You can’t perform that action at this time.
0 commit comments