Off-by-one error in assert condition...

While this was safe, it was also over-zealous, disallowing the path from
ending with the placeholder... Incidentally, the default.

Laughed-at-by: w00t_
(cherry picked from commit 7b693627ee2a17718cb6d8bee5e3deb5a97b307f)

Change-Id: I61a1511bca5cafe2edde20ef38c23154200dfcab
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
bb10
João Abecasis 2011-08-22 11:30:26 +02:00 committed by Qt by Nokia
parent 5658572a27
commit 53aa54fb94
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ static bool createFileFromTemplate(NativeFileHandle &file,
{
Q_ASSERT(length != 0);
Q_ASSERT(pos < size_t(path.length()));
Q_ASSERT(length < size_t(path.length()) - pos);
Q_ASSERT(length <= size_t(path.length()) - pos);
Char *const placeholderStart = (Char *)path.data() + pos;
Char *const placeholderEnd = placeholderStart + length;