You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If passed number is 12345 and length is 6 , the returned buffer will contain"123455". This is because the last space keep the content before calling memmove. Although the returned value indicates the correct length which is 5 in this case, however the caller may ignore it. Just like the prv_getLocationString(), it will provide whole string "123455" regardless of the return length.
I would suggest to modify the utils_intToText() to ensure value zero is filled for the padding spaces. That avoid similar errors in the future.
The text was updated successfully, but these errors were encountered:
Have you found a case where the caller is ignoring it, or is this a usage in your own code? If wakaama is using it incorrectly, that usage should be corrected. To be clear, I have no objection to the change you propose but if there is a bug in wakaama I would like to see that fixed also.
If passed number is 12345 and length is 6 , the returned buffer will contain"123455". This is because the last space keep the content before calling memmove. Although the returned value indicates the correct length which is 5 in this case, however the caller may ignore it. Just like the prv_getLocationString(), it will provide whole string "123455" regardless of the return length.
I would suggest to modify the utils_intToText() to ensure value zero is filled for the padding spaces. That avoid similar errors in the future.
The text was updated successfully, but these errors were encountered: