big-endian compatibility for uninstall_generate
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4620 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
bd9130a0c8
commit
9079530840
1 changed files with 7 additions and 2 deletions
|
@ -2926,7 +2926,11 @@ int CEXEBuild::uninstall_generate()
|
||||||
|
|
||||||
MMapBuf udata;
|
MMapBuf udata;
|
||||||
|
|
||||||
udata.add(&fh, sizeof(fh));
|
{
|
||||||
|
growbuf_writer_sink sink(&udata);
|
||||||
|
firstheader_writer w(&sink);
|
||||||
|
w.write(&fh);
|
||||||
|
}
|
||||||
|
|
||||||
ubuild_datablock.setro(TRUE);
|
ubuild_datablock.setro(TRUE);
|
||||||
|
|
||||||
|
@ -2987,7 +2991,7 @@ int CEXEBuild::uninstall_generate()
|
||||||
}
|
}
|
||||||
|
|
||||||
firstheader *_fh=(firstheader *)udata.get(0, sizeof(firstheader));
|
firstheader *_fh=(firstheader *)udata.get(0, sizeof(firstheader));
|
||||||
_fh->length_of_all_following_data=udata.getlen()+(build_crcchk?sizeof(int):0);
|
_fh->length_of_all_following_data=FIX_ENDIAN_INT32(udata.getlen()+(build_crcchk?sizeof(int):0));
|
||||||
udata.release();
|
udata.release();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3029,6 +3033,7 @@ int CEXEBuild::uninstall_generate()
|
||||||
left -= l;
|
left -= l;
|
||||||
}
|
}
|
||||||
udata.setro(FALSE);
|
udata.setro(FALSE);
|
||||||
|
FIX_ENDIAN_INT32_INPLACE(crc);
|
||||||
udata.add(&crc, sizeof(crc));
|
udata.add(&crc, sizeof(crc));
|
||||||
udata.setro(TRUE);
|
udata.setro(TRUE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue