diff --git a/src/spells.c b/src/spells.c index 8b504487a..8833497d5 100644 --- a/src/spells.c +++ b/src/spells.c @@ -604,13 +604,15 @@ static int sp_summon_familiar(castorder * co) else { bytes = strlcpy(bufp, (const char *)", ", size); } - if (wrptr(&bufp, &size, bytes) != 0) + assert(bytes <= INT_MAX); + if (wrptr(&bufp, &size, (int)bytes) != 0) WARN_STATIC_BUFFER(); } bytes = strlcpy(bufp, (const char *)skillname((skill_t)sk, mage->faction->locale), size); - if (wrptr(&bufp, &size, bytes) != 0) + assert(bytes <= INT_MAX); + if (wrptr(&bufp, &size, (int)bytes) != 0) WARN_STATIC_BUFFER(); } }