mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Add missing casts in dupcat().
Ahem. I _spotted_ this in code review, and forgot to make the change before pushing! Because it's legitimate for a C implementation to define 'NULL' so that it expands to just 0, it follows that if you use NULL in a variadic argument list where the callee will expect to extract a pointer, you run the risk of putting an int-sized rather than pointer-sized argument on the list and causing the consumer to get out of sync. So you have to add an explicit cast.
This commit is contained in:
@ -779,7 +779,7 @@ void logevent(void *frontend, const char *string)
|
||||
|
||||
if (*location)
|
||||
sfree(*location);
|
||||
*location = dupcat(timebuf, string, NULL);
|
||||
*location = dupcat(timebuf, string, (const char *)NULL);
|
||||
if (logbox) {
|
||||
int count;
|
||||
SendDlgItemMessage(logbox, IDN_LIST, LB_ADDSTRING,
|
||||
|
Reference in New Issue
Block a user