Fixed small archiver select problem

This commit is contained in:
Michiel Broek
2006-02-26 11:19:02 +00:00
parent 4ddb5863e7
commit 9293010a0b
3 changed files with 15 additions and 3 deletions

View File

@@ -770,13 +770,22 @@ char *PickArchive(char *shdr, int mailmode)
if (strncmp(pick, "P", 1) == 0)
if ((o - 10) >= 0)
o = o - 10;
if (strncmp(pick, "-", 1) == 0) {
break;
}
if ((atoi(pick) >= 1) && (atoi(pick) <= records)) {
offset = sizeof(archiverhdr) + ((atoi(pick) - 1) * archiverhdr.recsize);
fseek(fil, offset, 0);
fread(&archiver, archiverhdr.recsize, 1, fil);
strcpy(Arch, archiver.name);
break;
if ((mailmode && archiver.available && strlen(archiver.marc)) ||
(! mailmode && archiver.available && strlen(archiver.farc))) {
strcpy(Arch, archiver.name);
break;
} else {
working(2, 0, 0);
}
}
}
fclose(fil);