Jabon / mandelbulber

Automatically exported from code.google.com/p/mandelbulber
GNU General Public License v3.0
0 stars 0 forks source link

[PATCH] Fixed wrong usage of memset in src/timeline.cpp #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Please review the attached patch, it fixed a wrongly used memset call.
Memset has following signature:
void * memset ( void * ptr, int value, size_t num );
1) param ptr -> the buffer to be set
2) param value -> the value to be set
3) param num -> the number of bytes to be set

In timeline.cpp at line 395, memset was is wrongly used as followed:

 memset(params, sizeof(sParamRenderD), 0);

Probably the programmer did mix up the second and the third parameter.

Best regard

Martin Ettl

Reference:

http://www.cplusplus.com/reference/cstring/memset/

Original issue reported on code.google.com by ettl.mar...@gmail.com on 6 Nov 2013 at 2:01

Attachments:

GoogleCodeExporter commented 8 years ago
Tanks for finding this bug. It was a mistake in the code. Patch is applied to 
the code. I have checked all source files and found the same in other place.

Original comment by buddhi1...@gmail.com on 10 Nov 2013 at 8:04