fixed string skip in ReadVarLenArr
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4022 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
8bc1169798
commit
f79be84c4a
1 changed files with 5 additions and 2 deletions
|
@ -37,7 +37,7 @@
|
|||
#define ALIGN(dwToAlign, dwAlignOn) dwToAlign = (dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn
|
||||
|
||||
// Reads a variany length array from seeker into readInto and advances seeker
|
||||
void ReadVarLenArr(BYTE* &seeker, char* &readInto, unsigned int uCodePage) {
|
||||
void ReadVarLenArr(LPBYTE &seeker, char* &readInto, unsigned int uCodePage) {
|
||||
WORD* arr = (WORD*)seeker;
|
||||
switch (arr[0]) {
|
||||
case 0x0000:
|
||||
|
@ -64,7 +64,10 @@ void ReadVarLenArr(BYTE* &seeker, char* &readInto, unsigned int uCodePage) {
|
|||
{
|
||||
throw runtime_error("ReadVarLenArr - Unicode conversion failed.");
|
||||
}
|
||||
while (*(WCHAR*)seeker++);
|
||||
|
||||
PWCHAR wseeker = PWCHAR(seeker);
|
||||
while (*wseeker++);
|
||||
seeker = LPBYTE(wseeker);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue