mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
e507e24ffb
This change allows `CopyTo()` method to be used to copy bytes backwards within the same message (i.e., src and dest messages are the same and the dest offset is before src offset). Unit test `test_message` is updated in this commit to cover such a use. However, the `CopyTo()` implementing can still potentially overwrite the data when bytes are being copied forward within the same message. This commit adds an assert not allowing such a use and updates the method documentation mentioning this restriction.