[gnome-chess/gnome-3-8] Fix Stockfish engine integration



commit 566e8c9dd11e1cce8fb764c5f8ccb0dfcc6341f2
Author: Michael Catanzaro <mike catanzaro gmail com>
Date:   Sat May 11 22:24:08 2013 -0500

    Fix Stockfish engine integration
    
    Stockfish seems to go a bit nuts if passed an empty string for
    command-line arguments.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696474
    
    Conflicts:
        src/chess-engine-cecp.vala
        src/chess-engine-uci.vala
        src/chess-engine.vala

 src/ai-profile.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/ai-profile.vala b/src/ai-profile.vala
index 07cb636..a06b419 100644
--- a/src/ai-profile.vala
+++ b/src/ai-profile.vala
@@ -4,7 +4,7 @@ public class AIProfile
     public string protocol;
     public string binary;
     public string path;
-    public string args = "";
+    public string args;
     public string[] easy_options;
     public string[] normal_options;
     public string[] hard_options;
@@ -41,6 +41,8 @@ public List<AIProfile> load_ai_profiles (string filename)
            profile.binary = file.get_value (name, "binary");
            if (file.has_key (name, "args"))
                profile.args = file.get_value (name, "args");
+           else
+               profile.args = null; // bgo#696474
            profile.easy_options = load_options (file, name, "easy");
            profile.normal_options = load_options (file, name, "normal");
            profile.hard_options = load_options (file, name, "hard");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]