- fix some more warnings

This commit is contained in:
ajacoutot 2008-11-05 09:53:45 +00:00
parent d9c8c31e95
commit 009548de84
2 changed files with 16 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.2 2008/10/30 23:08:31 espie Exp $
# $OpenBSD: Makefile,v 1.3 2008/11/05 09:53:45 ajacoutot Exp $
COMMENT = Komi the Space Frog
DISTNAME = komi-1.04
PKGNAME = ${DISTNAME}p0
PKGNAME = ${DISTNAME}p1
CATEGORIES = games
HOMEPAGE = http://komi.sourceforge.net/

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-sprites_h,v 1.1 2008/11/05 09:53:46 ajacoutot Exp $
--- sprites.h.orig Wed Nov 5 10:48:52 2008
+++ sprites.h Wed Nov 5 10:49:16 2008
@@ -146,8 +146,8 @@ void loadsprite (struct sprite_struct * thesprite, cha
if (strlen(directory) + strlen(filename) >= sizeof(fullpath)) // Check for buffer overflow on fullpath
{
fprintf(stderr, "Fatal error while loading %s:\n", filename);
- fprintf(stderr, "Size of directory name (%d chars) plus size of file name (%d chars)\n", strlen(directory), strlen(filename));
- fprintf(stderr, "is too long (over %d chars), and would cause a buffer overflow...\n", sizeof(fullpath) - 1);
+ fprintf(stderr, "Size of directory name (%zu chars) plus size of file name (%zu chars)\n", strlen(directory), strlen(filename));
+ fprintf(stderr, "is too long (over %zu chars), and would cause a buffer overflow...\n", sizeof(fullpath) - 1);
cleanexit(1);
}
strcpy(fullpath, directory);