[mupen64plus-video-rice] 64/191: Fix random crash due to divide-by-zero error

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:17:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-video-rice.

commit f3db3e57baf28210d7b4bfefa2059370fd304362
Author: Sven Eckelmann <sven at narfation.org>
Date:   Sun Jul 24 10:47:39 2011 +0200

    Fix random crash due to divide-by-zero error
---
 debian/changelog                    |  1 +
 debian/patches/divide_by_zero.patch | 19 +++++++++++++++++++
 debian/patches/series               |  1 +
 3 files changed, 21 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 9dede0f..63c90d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ mupen64plus-video-rice (1.99.4-3) UNRELEASED; urgency=low
     - Add rewrite_makefile.patch, Rewrite Makefile to fix flags and linking
     - Add png_truecolor_conversation.patch, Convert 8-bit png to truecolor when
       needed
+    - Add divide_by_zero.patch, Fix random crash due to divide-by-zero error
   * Depend on pkg-config in debian/control for new Makefile
 
  -- Sven Eckelmann <sven at narfation.org>  Sat, 23 Jul 2011 16:42:59 +0200
diff --git a/debian/patches/divide_by_zero.patch b/debian/patches/divide_by_zero.patch
new file mode 100644
index 0000000..d25c70a
--- /dev/null
+++ b/debian/patches/divide_by_zero.patch
@@ -0,0 +1,19 @@
+Description: Fix random crash due to divide-by-zero error
+Origin: upstream, https://bitbucket.org/richard42/mupen64plus-video-rice/changeset/d53deb285eb9
+Author: Richard Goedeken <Richard at fascinationsoftware.com>
+
+---
+diff --git a/src/TextureFilters.cpp b/src/TextureFilters.cpp
+index 7837887a076ffd8b608b51fa11cab51ea95ff062..a8ac0d422b99e8c16e67d5bf6e9f8d87f535bd90 100644
+--- a/src/TextureFilters.cpp
++++ b/src/TextureFilters.cpp
+@@ -1378,7 +1378,8 @@ int FindScaleFactor(const ExtTxtrInfo &info, TxtrCacheEntry &entry)
+ 
+ int CheckTextureInfos( CSortedList<uint64,ExtTxtrInfo> &infos, TxtrCacheEntry &entry, int &indexa, int &scaleShift, bool bForDump = false)
+ {
+-    if(entry.ti.WidthToCreate/entry.ti.WidthToLoad > 2 || entry.ti.HeightToCreate/entry.ti.HeightToLoad > 2 )
++    if ((entry.ti.WidthToLoad  != 0 && entry.ti.WidthToCreate  / entry.ti.WidthToLoad  > 2) ||
++        (entry.ti.HeightToLoad != 0 && entry.ti.HeightToCreate / entry.ti.HeightToLoad > 2 ))
+     {
+         //DebugMessage(M64MSG_WARNING, "Hires texture does not support extreme texture replication");
+         return -1;
diff --git a/debian/patches/series b/debian/patches/series
index e1b5d8d..5726ac0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 rewrite_makefile.patch
 highres_memcorruption.patch
 png_truecolor_conversation.patch
+divide_by_zero.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-video-rice.git



More information about the Pkg-games-commits mailing list