forked from qt-creator/qt-creator
Utils: Fix SmallString::append(QStringView string)
It used the size of the destination string but it had to use the size of the appended string to inquire the maximum required size. Change-Id: I1c910abab0ac60ed5fec1b3dc3a358e438532281 Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
@@ -455,7 +455,7 @@ public:
|
||||
constexpr size_type temporaryArraySize = Size * 6;
|
||||
|
||||
size_type oldSize = size();
|
||||
size_type maximumRequiredSize = static_cast<size_type>(encoder.requiredSpace(oldSize));
|
||||
size_type maximumRequiredSize = static_cast<size_type>(encoder.requiredSpace(string.size()));
|
||||
char *newEnd = nullptr;
|
||||
|
||||
if (maximumRequiredSize > temporaryArraySize) {
|
||||
|
||||
Reference in New Issue
Block a user