mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-02-24 01:31:59 +08:00
Fix xy_streql
when NULL
This commit is contained in:
parent
b8b59ba3e1
commit
b4d6cf3e43
@ -292,6 +292,10 @@ _xy_str_to_terminal_style (int style, const char *str)
|
|||||||
static bool
|
static bool
|
||||||
xy_streql (const char *str1, const char *str2)
|
xy_streql (const char *str1, const char *str2)
|
||||||
{
|
{
|
||||||
|
if (NULL==str1 || NULL==str2)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return strcmp (str1, str2) == 0 ? true : false;
|
return strcmp (str1, str2) == 0 ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user