diff options
author | joerg <joerg> | 2014-12-11 22:10:04 +0000 |
---|---|---|
committer | joerg <joerg> | 2014-12-11 22:10:04 +0000 |
commit | 5a1c255885d1fe9730d683a425cc40292476ebe8 (patch) | |
tree | 84bce096a871efa9f98bc6275f9efb155d07b4dc /games | |
parent | 1927d862bcb147a5b9d799b7c1e2047fff395437 (diff) | |
download | pkgsrc-5a1c255885d1fe9730d683a425cc40292476ebe8.tar.gz |
Fix template use.
Diffstat (limited to 'games')
-rw-r--r-- | games/openttd/distinfo | 3 | ||||
-rw-r--r-- | games/openttd/patches/patch-src_fontcache.cpp | 17 |
2 files changed, 19 insertions, 1 deletions
diff --git a/games/openttd/distinfo b/games/openttd/distinfo index 89574a5467a..7e78ee27fcf 100644 --- a/games/openttd/distinfo +++ b/games/openttd/distinfo @@ -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.setting.in) = 1766a977ec259c443d13d64e16e77295bb2c6802 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 --git a/games/openttd/patches/patch-src_fontcache.cpp b/games/openttd/patches/patch-src_fontcache.cpp new file mode 100644 index 00000000000..e51a55941fe --- /dev/null +++ b/games/openttd/patches/patch-src_fontcache.cpp @@ -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"); |