CID 22513: Out-of-bounds read (OVERRUN)

This commit is contained in:
Enno Rehling 2015-10-30 14:41:52 +01:00
parent 1f45553cb5
commit 0da10ea490

View file

@ -571,11 +571,12 @@ static int sp_summon_familiar(castorder * co)
region *rn = rconnect(r, dir); region *rn = rconnect(r, dir);
if (rn && fval(rn->terrain, SEA_REGION)) { if (rn && fval(rn->terrain, SEA_REGION)) {
dh++; dh++;
if (dh == coasts) if (dh == coasts) {
r = rconnect(r, dir);
break; break;
} }
} }
r = rconnect(r, dir); }
} }
msg = msg_message("familiar_name", "unit", mage); msg = msg_message("familiar_name", "unit", mage);