S
Songmuh
I'm trying to use the InfoZIP by calling its main fucntion. When it's first
called, everything works. The second call with the same command except for
the zip filename failed with the error: zip error: Nothing to do!.
I've looked at the source code and found the problematic line of code that
caused this issue. It happens when a local structure is assigned to a global
structure pointer.
(in the fileio.c file) as follows:
strcpy(f->name, name);
f->iname = iname;
f->zname = zname;
f->dosflag = dosflag;
*fnxt = f; // This is the problematic line
where *fnxt is defined as
struct flist far * far *fnxt = &found;
and f is a local structure defined as
struct flist far *f;
I did a printf before and after each line and found that the value of found
is turned into 0 when the code is called the second time.
Any help will be appreciated.
called, everything works. The second call with the same command except for
the zip filename failed with the error: zip error: Nothing to do!.
I've looked at the source code and found the problematic line of code that
caused this issue. It happens when a local structure is assigned to a global
structure pointer.
(in the fileio.c file) as follows:
strcpy(f->name, name);
f->iname = iname;
f->zname = zname;
f->dosflag = dosflag;
*fnxt = f; // This is the problematic line
where *fnxt is defined as
struct flist far * far *fnxt = &found;
and f is a local structure defined as
struct flist far *f;
I did a printf before and after each line and found that the value of found
is turned into 0 when the code is called the second time.
Any help will be appreciated.