Hexdump: add check if file exists

This commit is contained in:
g1n 2021-08-24 11:41:20 +03:00
parent af7ac2654c
commit 1359b66b21
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,10 @@ int main() {
char data[10000]; // FIXME
char ch;
int byte = 0; // FIXME
if (infile == NULL) {
printf("Cannot find file: \n");
return 0;
}
while ((ch = fgetc(infile)) != EOF)
{
data[byte] = ch;