@ivesen you should check argc before dereferencing argv or you risk dereferencing NULL ...
@ivesen argc will be 1 to account for argv[0]. argv[argc] likewise should always be NULL or actually out of bounds depending on the compiler implementation since the last thing on the CMD line will be argv[argc-1]...