From 98112eee8f462da69d6f990eb72aac5337b95ffe Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 6 Jul 2025 21:50:54 -0400 Subject: [PATCH] [PATCH] Fix crash when trying to save less than the max number of fields (cherry picked from commit 049ce8700af96134a0fcfc575016514b4ae0e912) Gbp-Pq: Name upstream_9eb657e1_Fix-crash-when-trying-to-save-less-than-the-max-number-of-fields.patch --- src/account/profileeditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/account/profileeditor.cpp b/src/account/profileeditor.cpp index 17c7700..2cdd347 100644 --- a/src/account/profileeditor.cpp +++ b/src/account/profileeditor.cpp @@ -285,7 +285,7 @@ void ProfileEditorBackend::save() discoverablePart.setBody(discoverable() ? "1" : "0"); multiPart->append(discoverablePart); - for (int i = 0; i < maxFields(); i++) { + for (int i = 0; i < m_fields.size(); i++) { QHttpPart fieldNamePart; fieldNamePart.setHeader(QNetworkRequest::ContentDispositionHeader, QStringLiteral("form-data; name=\"fields_attributes[%1][name]\"").arg(i)); fieldNamePart.setBody(m_fields[i]["name"_L1].toString().toUtf8()); -- 2.30.2