[arch-commits] Commit in snes9x/trunk (PKGBUILD snes9x-fix-crash.patch)

Eric Bélanger eric at nymeria.archlinux.org
Sat May 24 20:52:12 UTC 2014


    Date: Saturday, May 24, 2014 @ 22:52:11
  Author: eric
Revision: 111794

upgpkg: snes9x 1.53-8

Fix crash (close FS#28368)

Added:
  snes9x/trunk/snes9x-fix-crash.patch
Modified:
  snes9x/trunk/PKGBUILD

------------------------+
 PKGBUILD               |    8 +++++---
 snes9x-fix-crash.patch |   30 ++++++++++++++++++++++++++++++
 2 files changed, 35 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-05-24 19:24:57 UTC (rev 111793)
+++ PKGBUILD	2014-05-24 20:52:11 UTC (rev 111794)
@@ -4,7 +4,7 @@
 pkgbase=snes9x
 pkgname=('snes9x' 'snes9x-gtk')
 pkgver=1.53
-pkgrel=7
+pkgrel=8
 arch=('i686' 'x86_64')
 url="https://code.google.com/p/snes9x-gtk/"
 license=('custom')
@@ -11,13 +11,15 @@
 makedepends=('intltool' 'nasm' 'mesa' 'libpulse'  'libpng' 'sdl' 'gtk2' 'libxv'
              'desktop-file-utils' 'gnome-icon-theme')
 source=(http://snes9x-gtk.googlecode.com/files/${pkgbase}-${pkgver}-src.tar.bz2
-        snes9x-gtk2.24.diff.gz)
+        snes9x-gtk2.24.diff.gz snes9x-fix-crash.patch)
 sha1sums=('57be6480369f66b9aaaeb722789ce114f58ed1e2'
-          '680dbe0a70f1821bc7931539e72f5a1a95e3938c')
+          '680dbe0a70f1821bc7931539e72f5a1a95e3938c'
+          '995495c68ffc00d8266d10a7bd8fc74fb6c147b1')
 
 prepare() {
   cd ${pkgbase}-${pkgver}-src
   patch -p1 -i "${srcdir}/snes9x-gtk2.24.diff"
+  patch -p1 -i "${srcdir}/snes9x-fix-crash.patch"
 }
 
 build() {

Added: snes9x-fix-crash.patch
===================================================================
--- snes9x-fix-crash.patch	                        (rev 0)
+++ snes9x-fix-crash.patch	2014-05-24 20:52:11 UTC (rev 111794)
@@ -0,0 +1,30 @@
+From 6d74746342a73cf65db215f4fdecdfb0cae66792 Mon Sep 17 00:00:00 2001
+From: Brandon Wright <bearoso at gmail.com>
+Date: Mon, 10 Feb 2014 16:28:05 -0600
+Subject: [PATCH] Fix bug caused by virtual directories.
+
+---
+ gtk/src/gtk_file.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/gtk/src/gtk_file.cpp b/gtk/src/gtk_file.cpp
+index a0df75d..9c0e000 100644
+--- a/gtk/src/gtk_file.cpp
++++ b/gtk/src/gtk_file.cpp
+@@ -465,8 +465,11 @@ S9xOpenROMDialog (void)
+         filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
+         directory =
+             gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dialog));
+-        strncpy (gui_config->last_directory, directory, PATH_MAX);
+-        g_free (directory);
++        if (directory)
++        {
++            strncpy (gui_config->last_directory, directory, PATH_MAX);
++            g_free (directory);
++        }
+     }
+ 
+     else
+-- 
+1.9.3
+




More information about the arch-commits mailing list