From: Fredrik Tolf Date: Thu, 13 Jan 2022 22:23:38 +0000 (+0100) Subject: bin: Fix string reference bug. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=5fa20111765780c54e72becce929b973dc78ed2e;p=coe.git bin: Fix string reference bug. --- diff --git a/coe/bin.py b/coe/bin.py index de3d6fa..0e92bc6 100644 --- a/coe/bin.py +++ b/coe/bin.py @@ -259,10 +259,10 @@ class decoder(object): return self.reftab[idx] return self.addref(self.loadint(fp)) elif pri == T_STR: - ret = self.addref(self.loadstr(fp)) + ret = self.loadstr(fp) if sec == STR_SYM: - return data.symbol.get("", ret) - return ret + return self.addref(data.symbol.get("", ret)) + return self.addref(ret) elif pri == T_BIT: ln = self.loadint(fp) ret = self.addref(fp.read(ln))