mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-23 15:53:26 +01:00
make function constant time
This commit is contained in:
parent
407d28bf5d
commit
dee263704c
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user