Nambers / MiraiCP

c++ SDK of Mirai
https://eritque-arcus.tech/MiraiCP/
GNU Affero General Public License v3.0
177 stars 31 forks source link

miraicode解析对at出错 #174

Closed lesser0 closed 1 year ago

lesser0 commented 1 year ago

Code of Conduct

问题描述

MessageChain MessageChain::deserializationFromMiraiCode(const std::string &m) 中不应有

if (t == 1)
    lastPos++;

且如果at的miraicode后直接接中文的话,缺少一个字节会导致不符合utf8编码,于是在之后的json的dump()中出错。

日志

No response

版本

v2.13.2

组件

Plugin(SDK)

编译器

Microsoft Visual C++ (MSVC)

系统

Windows

架构

x86-64/amd64

Nambers commented 1 year ago

提供一些可能的 MiraiCode 文本? 我用来测试

lesser0 commented 1 year ago

比如 "([mirai:at:任意qq号])" 不过是不是不需要了(