From 681697fd474e21537875dfc878001a8e43d20bec Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 17 Aug 2015 20:32:02 +0200 Subject: [PATCH] gcc still more picky than clang. --- src/spells.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); } }