From 476296ded63c44a5e8063a13ccec118853b61201 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 11 Mar 2006 11:37:41 +0000 Subject: [PATCH] no need for iNewIconSize in replace_icon git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4573 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/util.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Source/util.cpp b/Source/util.cpp index b514495a..86fbb53b 100644 --- a/Source/util.cpp +++ b/Source/util.cpp @@ -157,8 +157,6 @@ void replace_icon(CResourceEditor* re, WORD wIconId, const char* filename) // Delete old icons while (re->UpdateResource(RT_ICON, MAKEINTRESOURCE(i++), NSIS_DEFAULT_LANG, 0, 0)); - int iNewIconSize = 0; - for (i = 0; i < igh.wCount; i++) { fread(ige, sizeof(FileIconGroupEntry)-sizeof(DWORD), 1, f); ige->wRsrcId = i+1; @@ -184,9 +182,6 @@ void replace_icon(CResourceEditor* re, WORD wIconId, const char* filename) fsetpos(f, &pos); - // Every icon entry should be 8 aligned - iNewIconSize += ((ige->dwRawSize%8 == 0) ? ige->dwRawSize : ige->dwRawSize - (ige->dwRawSize%8) + 8); - // Seems like the compiler refuses to increase the pointer by just 14. // If you'll replace this line by ige++ you will get unwanted results. ige = (RsrcIconGroupEntry*)((BYTE*)ige + SIZEOF_RSRC_ICON_GROUP_ENTRY);