diff options
| author | jakob <jakob@memeware.net> | 2017-01-15 20:54:02 -0500 |
|---|---|---|
| committer | jakob <jakob@memeware.net> | 2017-01-15 20:54:02 -0500 |
| commit | ef05e4e0b8c5cc21b57ae60b60cfbfc7f046bd59 (patch) | |
| tree | b17419b5cf222dce068d18376760fe4647b01a95 /src/main.c | |
| parent | cd65c3320da08f0518e5e86e4645d836405c266b (diff) | |
defs.h is now included for write.c
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -110,8 +110,8 @@ int get_archive_version(FILE *archive) { } -/* Subroutine for finding the archive's table offset. If the - minor_version is invalid, the program will exit. */ +/* Subroutine for finding the archive's table offset. If + the minor_version is invalid, the program will exit. */ uint64_t get_table_offset(FILE *archive, uint8_t archive_version) { uint64_t table_offset; fseek(archive, XP3_TABLE_OFFSET, SEEK_SET); @@ -122,8 +122,9 @@ uint64_t get_table_offset(FILE *archive, uint8_t archive_version) { uint32_t minor_version; fread(&minor_version, sizeof(uint32_t), 1, archive); if (minor_version != 1) { - fprintf(stderr, "Minor version not implemented.\n"); + fprintf(stderr, "Archive version not implemented.\n"); fclose(archive); + exit(EXIT_FAILURE); } /* The read table_offset is an offset to the real table offset. */ fseek(archive, table_offset, SEEK_SET); |