diff options
author | spaceman <spaceman@antispaceman.com> | 2015-06-17 16:11:21 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-06-17 16:11:21 +0700 |
commit | e7edfef3e9b6430a214c031f1a74053741cef365 (patch) | |
tree | 113b882caa81aaa2f9d84730931ce27f36bd3ccd /games/openttd/openttd.patch | |
parent | 45e97bb0e4ab838a33ab8460b4f5c1b439c03eb6 (diff) | |
download | slackbuilds-e7edfef3e9b6430a214c031f1a74053741cef365.tar.xz |
games/openttd: Fix build.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/openttd/openttd.patch')
-rw-r--r-- | games/openttd/openttd.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/games/openttd/openttd.patch b/games/openttd/openttd.patch new file mode 100644 index 000000000000..437d5230b57d --- /dev/null +++ b/games/openttd/openttd.patch @@ -0,0 +1,13 @@ +--- src/fontcache.cpp.orig 2015-01-31 17:48:10.000000000 +0100 ++++ src/fontcache.cpp 2015-01-31 17:49:31.000000000 +0100 +@@ -527,8 +527,8 @@ + 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"); |