decrease the risk of an overflow due to typecase from unsigned to signed

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17065 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2008-04-10 21:49:40 +00:00
parent bf8e9994c0
commit 10080b8420

View file

@ -737,8 +737,8 @@ int rotleft(unsigned char *dst, /* output buffer */
src_words = BITMAP_WORDS(width) * height;
if(((height + 7) / 8) * width > dstlen) {
fprintf(stderr, "%s:%d %d x %d overflows %d bytes buffer, needs %d\n",
__FILE__, __LINE__, width, height, (int)dstlen,
fprintf(stderr, "%s:%d %d x %d overflows %ld bytes buffer, needs %d\n",
__FILE__, __LINE__, width, height, (unsigned long)dstlen,
((height + 7) / 8) * width );
return 0;
}