aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorjvech <jmvalenciae@unal.edu.co>2023-06-25 08:59:31 -0500
committerjvech <jmvalenciae@unal.edu.co>2023-06-25 08:59:31 -0500
commite9ee82e712a79decb30387905998e06296a8cea7 (patch)
tree61851031351c9cd8b237163092ba2ceea9e2db1b /src/main.c
parenta937fc89721b1e7895d186838b13b5782f3fd782 (diff)
fix: small segmentation fault bug fixedHEADmain
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index a1b79f3..74cdef9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -193,7 +193,8 @@ int main(int argc, char *argv[])
};
float *kernel = NULL;
- if (!strcmp(filter, "edge")) kernel = edge;
+ if (!filter) usage();
+ else if (!strcmp(filter, "edge")) kernel = edge;
else if (!strcmp(filter, "blur")) kernel = blur;
else if (!strcmp(filter, "sharpen")) kernel = sharpen;
else usage();
Feel free to download, copy and edit any repo