covered null case for COLORTERM variable

This commit is contained in:
Valerie Wolfe 2024-07-08 13:48:40 -04:00
parent 3c9623040f
commit 01573867eb

2
main.c
View file

@ -52,7 +52,7 @@ int main(int argc, char **argv) {
int color_mode = 0;
char * colorterm = getenv("COLORTERM");
if(strcmp(colorterm, ""))
if(colorterm != NULL && strcmp(colorterm, ""))
color_mode = 1;
// handle flags