diff --git a/SCons/Config/ms b/SCons/Config/ms index 63164e76..889acd13 100644 --- a/SCons/Config/ms +++ b/SCons/Config/ms @@ -123,7 +123,7 @@ makensis_env.Append(CCFLAGS = ['/Fa${TARGET}.lst']) # listing file name makensis_env.Append(LINKFLAGS = ['/opt:nowin98']) # 512 bytes align makensis_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file if defenv['UNICODE']: - makensis_env.Append(LINKFLAGS = ['/stack:2097152']) # need 2 MB of stack in Unicode (default is 1 MB) + makensis_env.Append(LINKFLAGS = ['/STACK:2097152']) # need 2 MB of stack in Unicode (default is 1 MB) ### plugin environment diff --git a/Source/ResourceVersionInfo.cpp b/Source/ResourceVersionInfo.cpp index 815c57ab..30c0a506 100644 --- a/Source/ResourceVersionInfo.cpp +++ b/Source/ResourceVersionInfo.cpp @@ -114,11 +114,6 @@ CResourceVersionInfo::~CResourceVersionInfo() } -void CResourceVersionInfo::SetFileFlags(int Value) -{ - m_FixedInfo.dwFileFlags = (m_FixedInfo.dwFileFlags & ~(m_FixedInfo.dwFileFlagsMask)) || Value; -} - void CResourceVersionInfo::SetFileVersion(int HighPart, int LowPart) { m_FixedInfo.dwFileVersionLS = LowPart; diff --git a/Source/ResourceVersionInfo.h b/Source/ResourceVersionInfo.h index cdcedbc5..421b78c0 100644 --- a/Source/ResourceVersionInfo.h +++ b/Source/ResourceVersionInfo.h @@ -84,14 +84,6 @@ public: virtual ~CResourceVersionInfo(); int SetKeyValue(LANGID lang_id, int codepage, TCHAR* AKeyName, TCHAR* AValue); - /** - * Sets the file flags into the VS_FIXEDFILEINFO structure for this object. - * Only what's set as valid in the dwFileFlagsMask is allowed to be set. - * Currently, this API is never used and unless dwFileFlagsMask is set, - * should never be used. - */ - void SetFileFlags(int Value); - /** * Set the file version. */ diff --git a/Source/lang.cpp b/Source/lang.cpp index 3bea8065..f2530721 100644 --- a/Source/lang.cpp +++ b/Source/lang.cpp @@ -194,14 +194,14 @@ void LangStringList::set(int pos, int index/*=-1*/, int uindex/*=-1*/, int proce void LangStringList::set(const TCHAR *name, int index, int uindex/*=-1*/, int process/*=-1*/) { - set(get(name), index, uindex, process); + set(find(name), index, uindex, process); } const TCHAR* LangStringList::pos2name(int pos) { struct langstring *data=(struct langstring *) m_gr.get(); - if ((unsigned int)pos > (m_gr.getlen() / sizeof(struct langstring))) + if (pos < 0 || (unsigned int)pos > (m_gr.getlen() / sizeof(struct langstring))) return 0; return ((const TCHAR*) m_strings.get() + data[pos].name); @@ -209,7 +209,7 @@ const TCHAR* LangStringList::pos2name(int pos) const TCHAR* LangStringList::offset2name(int name) { - if ((unsigned int)name > m_strings.getlen()/sizeof(TCHAR)) + if (name < 0 || (unsigned int)name > m_strings.getlen()/sizeof(TCHAR)) return 0; return (const TCHAR*) m_strings.get() + name; @@ -291,7 +291,7 @@ int StringsArray::set(int idx, const TCHAR *str) const TCHAR* StringsArray::get(int idx) { - if ((unsigned int)idx >= (m_offsets.getlen() / sizeof(int))) + if (idx < 0 || (unsigned int)idx >= (m_offsets.getlen() / sizeof(int))) return 0; return (const TCHAR *) m_strings.get() + ((int*) m_offsets.get())[idx]; diff --git a/Source/script.cpp b/Source/script.cpp index 3bf2ee77..e9645051 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -5892,6 +5892,11 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) build_overwrite=1; // off int old_build_datesave=build_datesave; build_datesave=0; // off + + // Jim Park: While the code looks as if the same DLL is added multiple + // times for each command in the DLL, this is actually not the case + // because of CEXEBuild::datablock_optimize() that tries to discover + // duplicates and reuse them. ret=do_add_file(dllPath.c_str(),0,0,&files_added,tempDLL,2,&data_handle); // 2 means no size add if (ret != PS_OK) { return ret; diff --git a/Source/uservars.h b/Source/uservars.h index 18ecceac..fecd392c 100644 --- a/Source/uservars.h +++ b/Source/uservars.h @@ -109,6 +109,7 @@ class UserVarsStringList : public SortedStringListND int inc_reference(int idx) { int pos=get_internal_idx(idx); + if (pos==-1) return -1; return ((struct uservarstring*) m_gr.get())[pos].reference++; }