1
0

010-fix-rpmatch.patch 456 B

12345678910111213141516171819
  1. --- a/include/common.h
  2. +++ b/include/common.h
  3. @@ -137,10 +137,12 @@ static inline bool prompt(const char *ms
  4. }
  5. if (strcmp("\n", line) != 0) {
  6. - switch (rpmatch(line)) {
  7. - case 0: ret = false; break;
  8. - case 1: ret = true; break;
  9. - case -1:
  10. + switch (line[0]) {
  11. + case 'N':
  12. + case 'n': ret = false; break;
  13. + case 'Y':
  14. + case 'y': ret = true; break;
  15. + default:
  16. puts("unknown response; please try again");
  17. continue;
  18. }