Menu

#1 memset has incorect size

open
nobody
None
5
2009-10-13
2009-10-13
No

The following error was raised on the Debian package for ltris, see:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=186780

As one example, this one in src/tetris.c in function tetris_make_stat was broken:
(it only sets half the array)

double scores[1024];
[ cut ]
memset( scores, 0, sizeof( int ) * 1024 );

So I put in this:
memset( scores, 0, sizeof(scores) );

Discussion


Log in to post a comment.

MongoDB Logo MongoDB