diff --git a/programs/cmm/python/library/head.h b/programs/cmm/python/library/head.h index 762a5a2c05..a6c113fbb4 100644 --- a/programs/cmm/python/library/head.h +++ b/programs/cmm/python/library/head.h @@ -27,6 +27,8 @@ #define PY_DCT 16 #define PY_NA_STR 32 +#define PY_SYM_STR 33 + #define PY_ADD 0 #define PY_POW 1 diff --git a/programs/cmm/python/library/opcode.h b/programs/cmm/python/library/opcode.h index 907d5a6bd0..b2d196cf80 100644 --- a/programs/cmm/python/library/opcode.h +++ b/programs/cmm/python/library/opcode.h @@ -377,6 +377,8 @@ dword x = 0; dword y = 0; dword l = 0; + byte t = 0; + x = popStack(); y = popStack(); @@ -389,8 +391,20 @@ IF(l<=x) test("error max list",0); IF(0>l) test("error min list",0); - y = DSDWORD[y]; - pushStack(DSDWORD[x*4+y]); + t = DSBYTE[y+4]; + + IF(t==PY_LST) + { + y = DSDWORD[y]; + pushStack(DSDWORD[x*4+y]); + return; + } + IF(t==PY_STR) + { + y = DSDWORD[y]; + load_const(y+x,PY_STR,1); + return; + } } /*