diff --git a/App/lib/core/Gen/CallGenMixin.vp b/App/lib/core/Gen/CallGenMixin.vp index 59bbec0..61a3445 100644 --- a/App/lib/core/Gen/CallGenMixin.vp +++ b/App/lib/core/Gen/CallGenMixin.vp @@ -437,8 +437,10 @@ class CallGenMixin(CallGenBase.CallGenBase): if rc_mq_path is not None: rc_mq_dot: str = string.strrchr(rc_mq_path, 46) # 46 = ord('.') if rc_mq_dot is not None and rc_mq_dot[1] != '\0': - # 模块路径 = 末段之前(支持多级: w32.fileio.Class.Variant) - rc_mq_len: t.CSizeT = rc_mq_dot - rc_mq_path + # 模块路径 = 末段之前(支持多级: w32.fileio.Class.Variant)。 + # 注意:不能用 rc_mq_dot - rc_mq_path 指针减法(TPC 直接发 + # sub i8*, i8* 非法 IR),用 strlen 整数差扣除末段与分隔点。 + rc_mq_len: t.CSizeT = string.strlen(rc_mq_path) - string.strlen(rc_mq_dot + 1) - 1 rc_mq_mod: str = pool.alloc(rc_mq_len + 1) if rc_mq_mod is not None: string.memcpy(rc_mq_mod, rc_mq_path, rc_mq_len)