From 2a7c5d511591539b74fa576b76fbde3169bc1172 Mon Sep 17 00:00:00 2001 From: anders_k Date: Mon, 23 Aug 2021 22:24:33 +0000 Subject: [PATCH] Endian fix git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7302 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/ResourceEditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/ResourceEditor.cpp b/Source/ResourceEditor.cpp index bafb7034..8a704636 100644 --- a/Source/ResourceEditor.cpp +++ b/Source/ResourceEditor.cpp @@ -172,7 +172,7 @@ static TCHAR* ParseResProtocolAlloc(const TCHAR*Url, const TCHAR*&Type, const TC TCHAR proto[42], *path = 0, *buf = 0, *pD, ch; UINT prefix = 6, mswin = Platform_IsWindows(), bad = false, pipe = 0, skip = 0; my_strncpy(proto, Url, prefix+!0); - size_t pathend = 0, typestart = 0, namestart = 0, i, cch; + size_t typestart = 0, namestart = 0, i, cch; if (lowercase(tstring(proto)).compare(_T("res://")) != 0) return path; for (Url += prefix, i = 0; Url[i]; ++i) @@ -933,7 +933,7 @@ BYTE* CResourceEditor::ExtractIcoCurW(const WINWCHAR* szType, WINWCHAR* szName, // Get the size of all images for (i = 0, pRGE = pFirstRGE; i < count; ++i, pRGE += cbRGE / sizeof(*pRGE)) { pRDE = FindIcoCurDataEntry(imgResType, ((RSRCICOGROUPENTRY*)pRGE)->Id, wLanguage); - if (pRDE && pRDE->GetData()) cbImages += ((FILEICOGROUPENTRY*)pRGE)->Size; else count = 0; + if (pRDE && pRDE->GetData()) cbImages += FIX_ENDIAN_INT32(((FILEICOGROUPENTRY*)pRGE)->Size); else count = 0; } // Build the .ICO file GENERICIMAGEINFO ii;