1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Author: Lukas Geyer <lukas@debian.org>
Description: Made all score variables long int.
Bugs: #192902
--- sjeng-11.2.orig/learn.c
+++ sjeng-11.2/learn.c
@@ -36,13 +36,13 @@
}
LearnType;
-void Learn(int score, int best, int depth)
+void Learn(long score, int best, int depth)
{
int number = 0, next = 0;
LearnType draft;
FILE **lrnfile;
- printf("Learning score: %d best: %d depth:%d hash: %X\n", score, best, depth, hash);
+ printf("Learning score: %ld best: %d depth:%d hash: %lX\n", score, best, depth, hash);
if (Variant == Normal)
{
@@ -122,6 +122,7 @@
{
lrnfile = &lrn_losers;
}
+ else return; // Can this happen?
fseek(*lrnfile, 0, SEEK_SET);
fread(&number, sizeof(int), 1, *lrnfile);
|