Hello,

When I wanted to open one of my own chessbase databases, scidb crashed. I figured out that it must be something with the eco codes, and when I changed the code for convertEco function in cbh_codec.cpp it was fixed and I could open the database again. Attached to this message you can find the patch and the source database causing problem.

Regards,
Ali Parsai

diff -rupN scidb-beta-code-r960/src/db/cbh/cbh_codec.cpp new/src/db/cbh/cbh_codec.cpp
--- scidb-beta-code-r960/src/db/cbh/cbh_codec.cpp	2013-10-02 11:45:05.000000000 +0200
+++ new/src/db/cbh/cbh_codec.cpp	2014-11-23 14:52:27.182364590 +0100
@@ -396,7 +396,8 @@ convPlayerName(mstl::string& str)
 inline static unsigned
 convertEco(unsigned code)
 {
-	return code ? (code >> 7) & 0x1ff : 0;
+	unsigned returnValue = code ? (code >> 7) & 0x1ff : 0;
+	return returnValue<=500 ? returnValue : 0;
 }
 

Attachment: database.7z
Description: application/7z-compressed

Reply via email to