diff --git a/src/stardict_lib.cpp b/src/stardict_lib.cpp index 0af5b81..fe3e360 100644 --- a/src/stardict_lib.cpp +++ b/src/stardict_lib.cpp @@ -897,8 +897,10 @@ bool SynFile::lookup(const char *str, glong &idx) } if (!bFound) idx = iFrom; //next - else - idx = iThisIndex; + else { + const gchar *key = get_key(iThisIndex); + idx = g_ntohl(get_uint32(key+strlen(key)+1)); + } } return bFound; }