Skip to content

Commit b4d6cf3

Browse files
committed
Fix xy_streql when NULL
1 parent b8b59ba commit b4d6cf3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/xy.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ _xy_str_to_terminal_style (int style, const char *str)
292292
static bool
293293
xy_streql (const char *str1, const char *str2)
294294
{
295+
if (NULL==str1 || NULL==str2)
296+
{
297+
return false;
298+
}
295299
return strcmp (str1, str2) == 0 ? true : false;
296300
}
297301

0 commit comments

Comments
 (0)