I was previously using the following code to determine if a file was an .exe or .o file and thus set binFile to 1:
if(strstr(fpath,".exe") != NULL || strstr(fpath,".o") != NULL)
binFile = 1;
Through debugging, I noticed that this method will also set binFile to 1 with files like foo.out or foo.execute. What I really want is to match '.exe\0' and '.o\0' but strstr() says it ignores the terminating NUL bytes. How should I go about this?
Thanks