From 42f134860a3f39fbad0248e7ec3eac6a00b40138 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 7 Aug 2004 15:47:12 +0000 Subject: [PATCH] Fixed the cause of bug #1004496 - Install with /NCRC hangs The hanging disappeared along with the removal of the threaded lzma decoder, but the cause stayed. When the user specified /NCRC on the command line, loadHeaders reported the compressed data size to be 4 bytes larger than it really is. Instead of checking the header flags, it checked the combined flags (command line and header), concluded CRC checksum is disabled and therefore didn't subtract the 4 bytes of the CRC checksum from the compressed data size. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3613 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/fileform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/exehead/fileform.c b/Source/exehead/fileform.c index c348b1c5..b4f09f88 100644 --- a/Source/exehead/fileform.c +++ b/Source/exehead/fileform.c @@ -256,7 +256,7 @@ const char * NSISCALL loadHeaders(int cl_flags) } dbd_srcpos = SetSelfFilePointer(g_filehdrsize + sizeof(firstheader)); #ifdef NSIS_CONFIG_CRC_SUPPORT - dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data - ((cl_flags & FH_FLAGS_NO_CRC) ? 0 : sizeof(int)); + dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data - ((h.flags & FH_FLAGS_NO_CRC) ? 0 : sizeof(int)); #else dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data; #endif//NSIS_CONFIG_CRC_SUPPORT