For legacy reasons, the accessor class allows operator[] to go out of bounds and just returns an empty string. However, we were returning a pointer to the one-past-end of the array, which appears to have been a null byte in the test. Instead of adding branching code to load the length of the first string in operator[], we can just add an extra null character at the position we were returning anyway. Pick-to: 6.5 Change-Id: I4878533dcb2d4b3e8efefffd17e4f876b43e9ee3 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> (cherry picked from commit 8a768fe7db6ac5388fec6a68687817796b44439e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| tst_qoffsetstringarray.cpp | ||