http://bugs.winehq.org/show_bug.cgi?id=15033
--- Comment #11 from Jeff Zaroyko jeffzaroyko@gmail.com 2008-09-04 02:30:19 --- (In reply to comment #10)
- char pgmbuffer[SHADER_PGMSIZE];
- buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
SHADER_PGMSIZE);
- buffer.buffer = (char *)&pgmbuffer;
That looks wrong
- buffer.buffer = pgmbuffer;
Should be right
char *foo; char foo[5];
The only difference between the two is that the former requires a malloc and the latter is of a fixed size.
It's not wrong, just redundant. The value of an array is a pointer to its first element, the addressof (&) the array is a pointer to an array of char of size SHADER_PGMSIZE and then casting that to char * is equivalent. It doesn't matter anyway, Stefan has pointed out that the patch is wrong due to the problem being elsewhere.