From cf30a3d9b2e8584fa419ea1a6ee3d64a140352a0 Mon Sep 17 00:00:00 2001
From: hjk <hjk121@nokiamail.com>
Date: Tue, 4 Nov 2014 11:57:55 +0100
Subject: [PATCH] Rcc: ensure enough space for the embedded

The two-pass feature depends on the QRC_DATA signature that needs
to be stored in the array later overwritten by the embedded data.

Task-number: QTBUG-42359
Change-Id: Ida1ccff40dda28f92a4267f86f48ee96d62bd214
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
---
 src/tools/rcc/rcc.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp
index 9d8a7b70510..7623ce2e4aa 100644
--- a/src/tools/rcc/rcc.cpp
+++ b/src/tools/rcc/rcc.cpp
@@ -889,6 +889,8 @@ bool RCCResourceLibrary::writeDataBlobs()
     if (m_format == C_Code)
         writeString("\n};\n\n");
     else if (m_format == Pass1) {
+        if (offset < 8)
+            offset = 8;
         writeString("\nstatic const unsigned char qt_resource_data[");
         writeByteArray(QByteArray::number(offset));
         writeString("] = { 'Q', 'R', 'C', '_', 'D', 'A', 'T', 'A' };\n\n");
-- 
GitLab