You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.4 KiB

  1. Index: bash-4.4/expr.c
  2. ===================================================================
  3. --- bash-4.4.orig/expr.c
  4. +++ bash-4.4/expr.c
  5. @@ -578,24 +578,23 @@ expcond ()
  6. rval = cval = explor ();
  7. if (curtok == QUES) /* found conditional expr */
  8. {
  9. - readtok ();
  10. - if (curtok == 0 || curtok == COL)
  11. - evalerror (_("expression expected"));
  12. if (cval == 0)
  13. {
  14. set_noeval = 1;
  15. noeval++;
  16. }
  17. + readtok ();
  18. + if (curtok == 0 || curtok == COL)
  19. + evalerror (_("expression expected"));
  20. +
  21. val1 = EXP_HIGHEST ();
  22. if (set_noeval)
  23. noeval--;
  24. if (curtok != COL)
  25. evalerror (_("`:' expected for conditional expression"));
  26. - readtok ();
  27. - if (curtok == 0)
  28. - evalerror (_("expression expected"));
  29. +
  30. set_noeval = 0;
  31. if (cval)
  32. {
  33. @@ -603,7 +602,11 @@ expcond ()
  34. noeval++;
  35. }
  36. + readtok ();
  37. + if (curtok == 0)
  38. + evalerror (_("expression expected"));
  39. val2 = expcond ();
  40. +
  41. if (set_noeval)
  42. noeval--;
  43. rval = cval ? val1 : val2;
  44. Index: bash-4.4/patchlevel.h
  45. ===================================================================
  46. --- bash-4.4.orig/patchlevel.h
  47. +++ bash-4.4/patchlevel.h
  48. @@ -25,6 +25,6 @@
  49. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  50. looks for to find the patch level (for the sccs version string). */
  51. -#define PATCHLEVEL 7
  52. +#define PATCHLEVEL 8
  53. #endif /* _PATCHLEVEL_H_ */