Some system I tested on didn't quite get the END part and seeked beyond the end of the file which caused the CRC checksum to be written in a place where the exehead didn't expect it. Because of this, all solid installers compiled on that system failed CRC.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3456 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-02-03 13:44:03 +00:00
parent 4a6a8ef996
commit e5280834ac

View file

@ -2605,6 +2605,8 @@ int CEXEBuild::write_output(void)
}
compressor->End();
unsigned fend = ftell(fp);
fh.length_of_all_following_data=ftell(fp)-fd_start+(build_crcchk?sizeof(int):0);
INFO_MSG(
"%10d / %d bytes\n",
@ -2629,7 +2631,7 @@ int CEXEBuild::write_output(void)
}
}
#endif
fseek(fp,0,SEEK_END); // reset eof flag
fseek(fp,fend,SEEK_SET); // reset eof flag
}
#endif