mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
fix memory corruption on 64-bit systems
This commit is contained in:
parent
abb8da44ba
commit
093a260f1d
1 changed files with 3 additions and 3 deletions
|
@ -562,12 +562,12 @@ DrawCtx*
|
|||
cursesDrawCtxtMake( WINDOW* boardWin )
|
||||
{
|
||||
CursesDrawCtx* dctx = malloc( sizeof(CursesDrawCtx) );
|
||||
short i;
|
||||
int ii;
|
||||
|
||||
dctx->vtable = malloc( sizeof(*(((CursesDrawCtx*)dctx)->vtable)) );
|
||||
|
||||
for ( i = 0; i < sizeof(*dctx->vtable)/4; ++i ) {
|
||||
((void**)(dctx->vtable))[i] = draw_doNothing;
|
||||
for ( ii = 0; ii < VSIZE(dctx->vtable); ++ii ) {
|
||||
((void**)(dctx->vtable))[ii] = draw_doNothing;
|
||||
}
|
||||
|
||||
SET_VTABLE_ENTRY( dctx->vtable, draw_destroyCtxt, curses );
|
||||
|
|
Loading…
Add table
Reference in a new issue