From 8e9f72ae573195b51998c49db3579d51e20d93b0 Mon Sep 17 00:00:00 2001 From: Jeff Doozan Date: Sat, 19 Dec 2020 18:01:21 -0500 Subject: [PATCH] Synonyms lookup: return correct offset --- src/stardict_lib.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; }