More VC7 compatibility fixes
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1893 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
74d0c01f35
commit
56d17cbbd8
4 changed files with 5 additions and 5 deletions
|
@ -280,7 +280,7 @@ BYTE* CResourceEditor::Save(DWORD &dwSize) {
|
|||
sectionHeadersArray[i].PointerToRawData -= IMAGE_FIRST_SECTION(m_ntHeaders)[m_dwResourceSectionIndex].SizeOfRawData;
|
||||
sectionHeadersArray[i].PointerToRawData += dwRsrcSizeAligned;
|
||||
int secInDataDir = 0;
|
||||
for (int j = 0; j < ntHeaders->OptionalHeader.NumberOfRvaAndSizes; j++)
|
||||
for (unsigned int j = 0; j < ntHeaders->OptionalHeader.NumberOfRvaAndSizes; j++)
|
||||
if (ntHeaders->OptionalHeader.DataDirectory[j].VirtualAddress == sectionHeadersArray[i].VirtualAddress)
|
||||
secInDataDir = j;
|
||||
sectionHeadersArray[i].VirtualAddress -= RALIGN(dwOldVirtualSize, ntHeaders->OptionalHeader.SectionAlignment);
|
||||
|
|
|
@ -426,7 +426,7 @@ int CEXEBuild::add_string_main(const char *string, int process) // returns offse
|
|||
if (build_userlangstrings.find(cp, 0, &idx) < 0) idx = -1;
|
||||
}
|
||||
free(cp);
|
||||
if (idx >= 0) return -(idx+1+(sizeof(common_strings)+sizeof(installer_strings))/sizeof(int));
|
||||
if (idx >= 0) return -((int)(idx+1+(sizeof(common_strings)+sizeof(installer_strings))/sizeof(int)));
|
||||
}
|
||||
|
||||
if (!process) return build_strlist.add(string,2);
|
||||
|
@ -449,7 +449,7 @@ int CEXEBuild::add_string_uninst(const char *string, int process) // returns off
|
|||
if (ubuild_userlangstrings.find(cp, 0, &idx) < 0) idx = -1;
|
||||
}
|
||||
free(cp);
|
||||
if (idx >= 0) return -(idx+1+(sizeof(common_strings)+sizeof(uninstall_strings))/sizeof(int));
|
||||
if (idx >= 0) return -((int)(idx+1+(sizeof(common_strings)+sizeof(uninstall_strings))/sizeof(int)));
|
||||
}
|
||||
|
||||
if (!process) return ubuild_strlist.add(string,2);
|
||||
|
|
|
@ -224,7 +224,7 @@ int CEXEBuild::SetUserString(char *name, LANGID lang, char *string, int process/
|
|||
}
|
||||
|
||||
#define MAX(a, b) (a > b ? a : b)
|
||||
user_strings->resize(MAX(user_strings->getlen(), (unsigned int)(idx+1)*sizeof(unsigned int)));
|
||||
user_strings->resize(MAX((unsigned int)user_strings->getlen(), (idx+1)*sizeof(unsigned int)));
|
||||
((int*)user_strings->get())[idx] = uninst ? add_string_uninst(string,process) : add_string_main(string,process);
|
||||
|
||||
int zero = 0;
|
||||
|
|
|
@ -1571,7 +1571,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
|||
SCRIPT_MSG("LoadLanguageFile: %s\n", line.gettoken_str(1));
|
||||
try {
|
||||
NLF *newNLF = new NLF(line.gettoken_str(1));
|
||||
int i;
|
||||
unsigned int i;
|
||||
for (i = 0; i < build_nlfs.size(); i++)
|
||||
if (build_nlfs[i]->GetLang() == newNLF->GetLang()) {
|
||||
ERROR_MSG("Error: Can't add same language twice!\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue