qt6-bb10/tests/auto/corelib/tools/qoffsetstringarray
Thiago Macieira 7a31702345 QOffsetStringArray: fix off-by-one error for the past-the-end elements
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>
2024-07-25 20:06:41 +00:00
..
CMakeLists.txt CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
tst_qoffsetstringarray.cpp QOffsetStringArray: fix off-by-one error for the past-the-end elements 2024-07-25 20:06:41 +00:00