Fixed problem with LangString as section name

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2813 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-08-15 19:01:06 +00:00
parent 91e3fee204
commit cb3cb39264

View file

@ -1340,7 +1340,8 @@ int CEXEBuild::resolve_coderefs(const char *str)
for (x = sec->code; x < sec->code+sec->code_size; x ++)
{
char fname[1024];
if (sec->name_ptr) wsprintf(fname,"section \"%s\" (%d)",build_strlist.get()+sec->name_ptr,cnt);
char *secname = (sec->name_ptr < 0) ? build_userlangstrings.idx2name(-sec->name_ptr-1-(sizeof(common_strings)+sizeof(installer_strings))/sizeof(int)) : build_strlist.get()+sec->name_ptr;
if (sec->name_ptr) wsprintf(fname,"section \"%s\" (%d)",secname,cnt);
else wsprintf(fname,"unnamed section (%d)",cnt);
if (resolve_instruction(fname,str,w+x,x,sec->code,sec->code+sec->code_size)) return 1;
}