From ceba1a500dfca7b4fb7d074083991cefc5a3cf36 Mon Sep 17 00:00:00 2001
From: H.G. Muller <h.g.muller@hccnet.nl>
Date: Thu, 7 Oct 2010 11:59:33 +0200
Subject: [PATCH] Fix uninitialized variable in book code

The variable ' power' was used uninitialized in case -bookVariation was
set to 0, which can be an error even if it was only multiplied by zero.
---
 book.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/book.c b/book.c
index 48fbc9d..e19ef0b 100644
--- a/book.c
+++ b/book.c
@@ -499,7 +499,7 @@ char *ProbeBook(int moveNr, char *book)
         entries[count++] = entry;
     }
     if(appData.bookStrength != 50) { // transform weights
-        double power, maxWeight = 0.0;
+        double power = 0, maxWeight = 0.0;
         if(appData.bookStrength) power = (100.-appData.bookStrength)/appData.bookStrength;
         for(i=0; i<count; i++) if(entries[i].weight > maxWeight) maxWeight = entries[i].weight;
         for(i=0; i<count; i++){
-- 
1.7.0.4