mr_bones_    15/02/13 19:46:09

  Added:                gnugo-3.9.1-invalid-move.patch
  Log:
  add upstream patch to avoid crashing on invalid moves
  
  (Portage version: 2.2.14/cvs/Linux x86_64, unsigned Manifest commit)

Revision  Changes    Path
1.1                  games-board/gnugo/files/gnugo-3.9.1-invalid-move.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-board/gnugo/files/gnugo-3.9.1-invalid-move.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-board/gnugo/files/gnugo-3.9.1-invalid-move.patch?rev=1.1&content-type=text/plain

Index: gnugo-3.9.1-invalid-move.patch
===================================================================
>From 84a32e9cee2a70c0ec6ef58c1be279fed84a9a53 Mon Sep 17 00:00:00 2001
From: Gunnar Farnebäck <gun...@lysator.liu.se>
Date: Thu, 13 Jun 2013 18:45:03 +0000
Subject: Avoid crashing due to registering an invalid loss move reason.

---
diff --git a/engine/value_moves.c b/engine/value_moves.c
index e9f2daa..7ec8fdd 100644
--- a/engine/value_moves.c
+++ b/engine/value_moves.c
@@ -383,7 +383,7 @@ do_find_more_owl_attack_and_defense_moves(int color, int 
pos,
       int dcode = owl_does_defend(pos, dd, &kworm);
 
       if (dcode >= DRAGON2(dd).owl_defense_code) {
-       if (dcode == LOSS)
+       if (dcode == LOSS && kworm != NO_MOVE)
          add_loss_move(pos, dd, kworm);
        else
          add_owl_defense_move(pos, dd, dcode);
--
cgit v0.9.0.2




Reply via email to