Re: user.exe16: Fix an incorrect use of ADD_TO_T in FormatMessage16.
10 Jul
2017
10 Jul
'17
10:05 a.m.
On 9 July 2017 at 18:53, Gerald Pfeifer <gerald(a)pfeifer.com> wrote:
ADD_TO_T actually consists of two statements
#define ADD_TO_T(c) \ *t++=c;\ if (t-target == talloced) {\ target = HeapReAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,target,talloced*2);\ t = target+talloced;\ talloced*=2;\ }
so
for (x=b; *x; x++) ADD_TO_T(*x);
does _not_ actually do what one might expect/hope.
Fixed thusly, in line with other usage.
Alternatively, it shouldn't be hard to either fix the macro or replace it with a function.
3167
Age (days ago)
3167
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henri Verbeet