1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 20:23:01 +01:00

make function constant time

This commit is contained in:
Jfreegman 2013-10-22 01:59:06 -04:00
parent 407d28bf5d
commit dee263704c

View File

@ -53,7 +53,7 @@ void print_time(WINDOW *window)
/* Returns 1 if the string is empty, 0 otherwise */
int string_is_empty(char *string)
{
return strlen(string) <= 0;
return string[0] == '\0';
}
/* convert wide characters to null terminated string */