From: Nicholas N. <na...@us...> - 2007-10-26 20:37:30
|
Update of /cvsroot/battletorrent/nsis/tackon In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30852 Modified Files: tackon.c Log Message: This is safer Index: tackon.c =================================================================== RCS file: /cvsroot/battletorrent/nsis/tackon/tackon.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tackon.c 26 Oct 2007 19:52:17 -0000 1.2 --- tackon.c 26 Oct 2007 20:37:32 -0000 1.3 *************** *** 96,99 **** --- 96,101 ---- outfile = CreateFile(filename, GENERIC_WRITE, 0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL); + + //Set the pointer to the start of the data SetFilePointer(exefile,exesize-12-datasize,NULL,FILE_BEGIN); *************** *** 116,120 **** //update the CRC fcrc=CRC32(fcrc,buffer,rd); - left -=rd; //Write data total_written = 0; --- 118,121 ---- *************** *** 124,127 **** --- 125,129 ---- total_written += written; } + left -=rd; } //Complain if there were errors |