Not specifying any language now really causes the script compiler to use the last used language

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@705 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-08-21 19:03:56 +00:00
parent 018ec00790
commit 9f69735152

View file

@ -66,9 +66,9 @@ extern char *english_strings[] = {
"Skipped: "
};
int CEXEBuild::SetString(char *string, int id, int process, WORD lang/*=0*/) {
lang = lang?lang:build_nlfs.size()?build_nlfs[build_nlfs.size()-1]->GetLang():0;
lang = lang?lang:string_tables.size()?string_tables[0]->common.lang_id:1033; // Default is English (1033)
int CEXEBuild::SetString(char *string, int id, int process, LANGID lang/*=0*/) {
lang=lang?lang:last_used_lang;
last_used_lang=lang;
StringTable *table = 0;
for (int i = 0; i < string_tables.size(); i++) {
if (lang == string_tables[i]->common.lang_id) {
@ -176,7 +176,6 @@ int CEXEBuild::WriteStringTables() {
// If we have no tables (user didn't set any string and didn't load any NLF) create the default one
if (string_tables.size() == 0) {
build_header.common.str_tables_num = 1;
StringTable *table = (StringTable*)malloc(sizeof(StringTable));
if (!table) {
ERROR_MSG("Internal compiler error #12345: malloc(%d) failed\n",sizeof(StringTable));