diff --git a/libfile/fileHandling.c b/libfile/fileHandling.c index af05b9a..ea12e09 100644 --- a/libfile/fileHandling.c +++ b/libfile/fileHandling.c @@ -44,7 +44,7 @@ FILE *file_openrw(char* fileName, BOOL abortOnError) /* * Function Name: fileNextChar(FILE* fp) - * Description: Reads the file and returns next character, if file is null or its end of file, returns \¯. + * Description: Reads the file and returns next character, if file is null or its end of file, returns \�. */ char file_nextChar(FILE* fp) { @@ -59,7 +59,7 @@ char file_nextChar(FILE* fp) /* * Function Name: *fileNextLine(FILE *fp, char *buffer, int32_t bufferSize) - * Description: Reads the file and returns next line, if file is null or its end of file, returns \¯. + * Description: Reads the file and returns next line, if file is null or its end of file, returns \�. */ char *file_nextLine(FILE *fp, char *buffer, int32_t bufferSize) { @@ -76,7 +76,11 @@ char *file_nextLine(FILE *fp, char *buffer, int32_t bufferSize) void exitIfEmptyFile(FILE *file) { long savedOffset = ftell(file); - fseek(file, 0, SEEK_END); + if (fseek(file, 0, SEEK_END) != 0) + { + fprintf(stderr, "\nError moving the offset in an input file\n"); + exit(1); + } if (ftell(file) == 0) {