mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 22:31:36 +00:00
Catch that one too
This commit is contained in:
parent
1929b129ee
commit
5bdf0aff81
1 changed files with 6 additions and 1 deletions
7
pak.c
7
pak.c
|
@ -334,6 +334,7 @@ static bool pak_extract_all(pak_file_t *pak, const char *dir) {
|
|||
static bool pak_insert_one(pak_file_t *pak, const char *file) {
|
||||
pak_directory_t dir;
|
||||
unsigned char *dat;
|
||||
long len;
|
||||
FILE *fp;
|
||||
|
||||
/*
|
||||
|
@ -353,9 +354,13 @@ static bool pak_insert_one(pak_file_t *pak, const char *file) {
|
|||
* to the PAK file itself.
|
||||
*/
|
||||
fs_file_seek(fp, 0, SEEK_END);
|
||||
dir.len = fs_file_tell(fp);
|
||||
if ((len = fs_file_tell(fp)) < 0) {
|
||||
fs_file_close(fp);
|
||||
return false;
|
||||
}
|
||||
fs_file_seek(fp, 0, SEEK_SET);
|
||||
|
||||
dir.len = len;
|
||||
dir.pos = fs_file_tell(pak->handle);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue