Bash-4.2 patch 15
This commit is contained in:
19
expr.c
19
expr.c
@@ -476,19 +476,23 @@ expassign ()
|
|||||||
|
|
||||||
if (special)
|
if (special)
|
||||||
{
|
{
|
||||||
|
if ((op == DIV || op == MOD) && value == 0)
|
||||||
|
{
|
||||||
|
if (noeval == 0)
|
||||||
|
evalerror (_("division by 0"));
|
||||||
|
else
|
||||||
|
value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
switch (op)
|
switch (op)
|
||||||
{
|
{
|
||||||
case MUL:
|
case MUL:
|
||||||
lvalue *= value;
|
lvalue *= value;
|
||||||
break;
|
break;
|
||||||
case DIV:
|
case DIV:
|
||||||
if (value == 0)
|
|
||||||
evalerror (_("division by 0"));
|
|
||||||
lvalue /= value;
|
lvalue /= value;
|
||||||
break;
|
break;
|
||||||
case MOD:
|
case MOD:
|
||||||
if (value == 0)
|
|
||||||
evalerror (_("division by 0"));
|
|
||||||
lvalue %= value;
|
lvalue %= value;
|
||||||
break;
|
break;
|
||||||
case PLUS:
|
case PLUS:
|
||||||
@@ -804,7 +808,12 @@ exp2 ()
|
|||||||
val2 = exppower ();
|
val2 = exppower ();
|
||||||
|
|
||||||
if (((op == DIV) || (op == MOD)) && (val2 == 0))
|
if (((op == DIV) || (op == MOD)) && (val2 == 0))
|
||||||
evalerror (_("division by 0"));
|
{
|
||||||
|
if (noeval == 0)
|
||||||
|
evalerror (_("division by 0"));
|
||||||
|
else
|
||||||
|
val2 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (op == MUL)
|
if (op == MUL)
|
||||||
val1 *= val2;
|
val1 *= val2;
|
||||||
|
|||||||
@@ -25,6 +25,6 @@
|
|||||||
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
|
||||||
looks for to find the patch level (for the sccs version string). */
|
looks for to find the patch level (for the sccs version string). */
|
||||||
|
|
||||||
#define PATCHLEVEL 14
|
#define PATCHLEVEL 15
|
||||||
|
|
||||||
#endif /* _PATCHLEVEL_H_ */
|
#endif /* _PATCHLEVEL_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user