mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
make error reporting a little saner (hopefully)
This commit is contained in:
parent
7af99f422f
commit
1a6a9f177d
1 changed files with 3 additions and 1 deletions
|
@ -71,10 +71,12 @@ pack_open (const char *name)
|
|||
if (Qread (pack->handle, &pack->header, sizeof (pack->header))
|
||||
!= sizeof (pack->header)) {
|
||||
fprintf (stderr, "%s: not a pack file\n", name);
|
||||
errno = 0;
|
||||
goto error;
|
||||
}
|
||||
if (strncmp (pack->header.id, "PACK", 4)) {
|
||||
fprintf (stderr, "%s: not a pack file\n", name);
|
||||
errno = 0;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
@ -86,7 +88,7 @@ pack_open (const char *name)
|
|||
|
||||
pack->files = malloc (pack->files_size * sizeof (dpackfile_t));
|
||||
if (!pack->files) {
|
||||
fprintf (stderr, "out of memory\n");
|
||||
//fprintf (stderr, "out of memory\n");
|
||||
goto error;
|
||||
}
|
||||
Qseek (pack->handle, pack->header.dirofs, SEEK_SET);
|
||||
|
|
Loading…
Reference in a new issue