applied patch #1180886 - fix halibut segfaults on powerpc (and maybe other platforms)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3959 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
9fdd4fbfc0
commit
b62da6fe46
1 changed files with 10 additions and 11 deletions
|
@ -73,21 +73,21 @@ static void dospace(word *** wret)
|
|||
static void donumber(word *** wret, int num)
|
||||
{
|
||||
wchar_t text[20];
|
||||
wchar_t *p = text + sizeof(text);
|
||||
*--p = L'\0';
|
||||
int i = 19;
|
||||
text[i] = L'\0';
|
||||
while (num != 0)
|
||||
{
|
||||
assert(p > text);
|
||||
*--p = L"0123456789"[num % 10];
|
||||
assert(i >= 0);
|
||||
i--; text[i] = L"0123456789"[num % 10];
|
||||
num /= 10;
|
||||
}
|
||||
dotext(wret, p);
|
||||
dotext(wret, &text[i]);
|
||||
}
|
||||
|
||||
static void doanumber(word *** wret, int num)
|
||||
{
|
||||
wchar_t text[20];
|
||||
wchar_t *p;
|
||||
int i = 19;
|
||||
int nletters, aton;
|
||||
nletters = 1;
|
||||
aton = 25;
|
||||
|
@ -100,15 +100,14 @@ static void doanumber(word *** wret, int num)
|
|||
else
|
||||
aton = INT_MAX;
|
||||
}
|
||||
p = text + sizeof(text);
|
||||
*--p = L'\0';
|
||||
text[i] = L'\0';
|
||||
while (nletters--)
|
||||
{
|
||||
assert(p > text);
|
||||
*--p = L"ABCDEFGHIJKLMNOPQRSTUVWXYZ"[num % 26];
|
||||
assert(i >= 0);
|
||||
i--; text[i] = L"ABCDEFGHIJKLMNOPQRSTUVWXYZ"[num % 26];
|
||||
num /= 26;
|
||||
}
|
||||
dotext(wret, p);
|
||||
dotext(wret, &text[i]);
|
||||
}
|
||||
|
||||
void number_cfg(numberstate * state, paragraph * source)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue