pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/openttd Fix template use.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/06cb1711d9fc
branches:  trunk
changeset: 643133:06cb1711d9fc
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Dec 11 22:10:04 2014 +0000

description:
Fix template use.

diffstat:

 games/openttd/distinfo                        |   3 ++-
 games/openttd/patches/patch-src_fontcache.cpp |  17 +++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletions(-)

diffs (36 lines):

diff -r 9d8faabcfdbc -r 06cb1711d9fc games/openttd/distinfo
--- a/games/openttd/distinfo    Thu Dec 11 22:08:53 2014 +0000
+++ b/games/openttd/distinfo    Thu Dec 11 22:10:04 2014 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2013/08/05 19:24:35 adam Exp $
+$NetBSD: distinfo,v 1.19 2014/12/11 22:10:04 joerg Exp $
 
 SHA1 (openttd-1.3.2-source.tar.xz) = 82283728e8812acf01e6aff59090de19edb40e5f
 RMD160 (openttd-1.3.2-source.tar.xz) = bfe9c7324debf55ec672b3b25a20af052d1f3f1a
@@ -7,4 +7,5 @@
 SHA1 (patch-Makefile.src.in) = 8b695a1ef030189c2716add7af3fd18298bc1bc7
 SHA1 (patch-aa) = b34cc7e0adf8a91657f1426ff2d888eb7c31bcb2
 SHA1 (patch-ab) = 866cfea4555b8947bcb21e684a288c35f8936ee2
+SHA1 (patch-src_fontcache.cpp) = df4101aa28ad7f0c3ccd371bc864117d928f4b93
 SHA1 (patch-src_string.cpp) = c694d4a44b5cfd766b0f962210b524674b01dfea
diff -r 9d8faabcfdbc -r 06cb1711d9fc games/openttd/patches/patch-src_fontcache.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/openttd/patches/patch-src_fontcache.cpp     Thu Dec 11 22:10:04 2014 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_fontcache.cpp,v 1.1 2014/12/11 22:10:04 joerg Exp $
+
+bitmap.width and bitmap.rows are unsigned, so std::max needs unsigned 1 too.
+
+--- src/fontcache.cpp.orig     2014-12-11 21:17:16.000000000 +0000
++++ src/fontcache.cpp
+@@ -481,8 +481,8 @@ const Sprite *FreeTypeFontCache::GetGlyp
+       aa = (slot->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY);
+ 
+       /* Add 1 pixel for the shadow on the medium font. Our sprite must be at least 1x1 pixel */
+-      int width  = max(1, slot->bitmap.width + (this->fs == FS_NORMAL));
+-      int height = max(1, slot->bitmap.rows  + (this->fs == FS_NORMAL));
++      int width  = max(1U, slot->bitmap.width + (this->fs == FS_NORMAL));
++      int height = max(1U, slot->bitmap.rows  + (this->fs == FS_NORMAL));
+ 
+       /* Limit glyph size to prevent overflows later on. */
+       if (width > 256 || height > 256) usererror("Font glyph is too large");



Home | Main Index | Thread Index | Old Index