diff options
-rw-r--r-- | mbbsd/record.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/record.c b/mbbsd/record.c index be3b1c07..c8393f6f 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -141,12 +141,12 @@ substitute_ref_record(char *direct, fileheader_t * fhdr, int ent) get_record(genbuf, &hdr, sizeof(hdr), num); if (strcmp(hdr.filename, fhdr->filename)) { - if((num = getindex(genbuf, fhdr, num))) + if((num = getindex(genbuf, fhdr, num))>0) { substitute_record(genbuf, fhdr, sizeof(*fhdr), num); } } - else + else if(num>0) { fhdr->money = hdr.money; substitute_record(genbuf, fhdr, sizeof(*fhdr), num); |