Stream::find() not working for values above 0x7F
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
- 領域
- api, embedded-iot
調査の方向性
Stream::find() と関連する findUntil() のエントリポイントを調査し、0xff を含む uint8_t シーケンスで報告された不一致を再現してください。0x7F を超える値の想定される扱いを確認し、その後、影響を受けるすべての関数でマッチングが一貫して機能すること、およびオープンな pull request がすでにこの問題に対処していないことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
I found out that the Stream::find() (and all related functions, findUntil() etc), does not work when the sequence to be found contains values above 0x7F. I believe this is because the function uses char instead of uint8_t.
Example, using these definitions:
char a = 0xff;
uint8_t b = 0xff;
a == b is false, and therefore the find() method does not return a match when supplied a uint8_t[] array containing values above 0x7F, since the array gets casted to char. Changing the declaration of find() to uint8_t should solve the issue.
I don't know if ignoring values above 0x7F is the intended behaviour, but if that is the case I think the documentation should be more specific and explain this case better. In any case, if the current behaviour is the intended one, i do not see the reason behind it.
First time reporting something on Arduino, sorry if I overlooked something obvious.
- 主要言語
- C++
- スター
- 306
- フォーク
- 150
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
arduino/ArduinoCore-API のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
arduino/ArduinoCore-API#261 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 30/100
arduino/ArduinoCore-API#256 ·
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
arduino/ArduinoCore-API#251 · コメント 1 件 ·
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
arduino/ArduinoCore-API#250 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
arduino/ArduinoCore-API#249 ·
arduino/ArduinoCore-API の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Component: GLib
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Mute ydb/tests/functional/dstool/test_canonical_requests.py.Test.test_group_take_snapshot in main オープンai_reviewed
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
ydb-platform/ydb#53974 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google/libultrahdr#485 ·