prevent out-of-bounds read.

This commit is contained in:
Enno Rehling 2018-05-06 16:35:23 +02:00
parent 088747ea81
commit 5af775ba87
1 changed files with 3 additions and 1 deletions

View File

@ -1943,7 +1943,9 @@ static spellparameter *add_spellparameter(region * target_r, unit * u,
break;
case 'r':
/* Parameter sind zwei Regionskoordinaten innerhalb der "normalen" Plane */
j = addparam_region(param + i, &spobj, u, ord);
if (i + 1 < size) {
j = addparam_region(param + i, &spobj, u, ord);
}
++c;
break;
case 'b':