git-svn: trunk@3132
Tomasz Kojm authored on 2007/07/11 07:36:34... | ... |
@@ -628,7 +628,17 @@ static int build(struct optstruct *opt) |
628 | 628 |
if(!strcmp(dbname, "main")) { |
629 | 629 |
fflush(stdin); |
630 | 630 |
mprintf("Functionality level: "); |
631 |
- scanf("%u", &fl); |
|
631 |
+ if(fgets(smbuff, sizeof(smbuff), stdin)) { |
|
632 |
+ cli_chomp(smbuff); |
|
633 |
+ } else { |
|
634 |
+ mprintf("!build: Can't get functionality level\n"); |
|
635 |
+ return -1; |
|
636 |
+ } |
|
637 |
+ fl = atoi(smbuff); |
|
638 |
+ if(!fl || fl > 99) { |
|
639 |
+ mprintf("!build: Incorrect functionality level\n"); |
|
640 |
+ return -1; |
|
641 |
+ } |
|
632 | 642 |
} else { |
633 | 643 |
fl = cl_retflevel(); |
634 | 644 |
} |
... | ... |
@@ -1465,7 +1475,7 @@ static int verifydiff(const char *diff, const char *cvd, const char *incdir) |
1465 | 1465 |
|
1466 | 1466 |
cvd ? (cpt = cvd) : (cpt = incdir); |
1467 | 1467 |
|
1468 |
- if(strstr(cpt, "main.cvd")) |
|
1468 |
+ if(strstr(cpt, "main")) |
|
1469 | 1469 |
strcpy(info, "main.info"); |
1470 | 1470 |
else |
1471 | 1471 |
strcpy(info, "daily.info"); |