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
This commit is contained in:
kichik 2004-08-07 15:47:12 +00:00
parent 727caf534d
commit 42f134860a

View file

@ -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