arduino / arduino/ArduinoCore-API

String == String does not work with embedded NUL characters

未关闭
#112 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
306
派生
150
PR 合并指标
30 天内没有已合并 PR

描述

https://github.com/arduino/ArduinoCore-API/blob/7f8de5869ee3de7a915bf1db64313c08595b3ac3/api/String.cpp#L445 and https://github.com/arduino/ArduinoCore-API/blob/7f8de5869ee3de7a915bf1db64313c08595b3ac3/api/String.cpp#L445 should use ``memcmp()`` to make sure that a String object can be compared to another String object that has embedded ``NUL`` characters

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 api/String.cpp 中第 445 行附近的比较代码开始,检查存在嵌入式 NUL 字符时 String 对象是如何进行比较的。按照描述更新比较逻辑以处理这些字符,然后验证针对嵌入式 NUL 值的 String-to-String 比较能够正确工作。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
embedded-iot
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。