Fix case when __FILE__ don't contain "/" nor "\\". (#745)

pull/747/head
Slyshyk Oleksiy 2018-10-30 18:56:36 +02:00 zatwierdzone przez Jerry Jacobs
rodzic 8c46827f54
commit e059ea7a55
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -20,7 +20,8 @@ int ugly_init(int maximum_threshold);
int ugly_log(int level, const char *tag, const char *format, ...);
#define UGLY_LOG_FILE (strstr(__FILE__, "/") != NULL ? \
strrchr(__FILE__, '/') + 1 : strrchr(__FILE__, '\\') + 1)
strrchr(__FILE__, '/') + 1 : strstr(__FILE__, "\\") != NULL ? \
strrchr(__FILE__, '\\') + 1 : __FILE__)
/** @todo we need to write this in a more generic way, for now this should compile
on visual studio (See http://stackoverflow.com/a/8673872/1836746) */