From 4393bfe7ce043c5866bd2bbdb182419ef1fe5e82 Mon Sep 17 00:00:00 2001 From: Andre Leiradella Date: Mon, 24 Aug 2015 23:34:58 -0300 Subject: [PATCH] corrected function name --- src/rl_imgdata.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rl_imgdata.c b/src/rl_imgdata.c index 3e21e0e..54675f6 100644 --- a/src/rl_imgdata.c +++ b/src/rl_imgdata.c @@ -59,7 +59,7 @@ const rl_imagedata_t* rl_imagedata_sub( const rl_imagedata_t* parent, int x0, in return NULL; } -void rl_image_destroy( const rl_imagedata_t* imagedata ) +void rl_imagedata_destroy( const rl_imagedata_t* imagedata ) { if ( !imagedata->parent ) { @@ -158,7 +158,7 @@ static size_t rle_row( uint16_t* rle, int* bgcount, const rl_imagedata_t* imaged while ( x < ( xx + limit ) && x < width ) { int aa; - uint16_t rgb16 = get_pixel( &aa, imagedata, x, y, check_transp, transparent ); + get_pixel( &aa, imagedata, x, y, check_transp, transparent ); if ( aa != a ) { @@ -219,7 +219,7 @@ const void* rl_imagedata_rle_encode( size_t* size, const rl_imagedata_t* imageda total += rle_row( NULL, &bgcount, imagedata, y, limit, check_transp, transparent ); } - void* rle = rl_malloc( total + 8 + height * 4 ); + void* rle = rl_malloc( total + ( 2 * sizeof( uint16_t ) + sizeof( uint32_t ) ) + height * sizeof( uint32_t ) ); if ( rle ) { @@ -242,7 +242,7 @@ const void* rl_imagedata_rle_encode( size_t* size, const rl_imagedata_t* imageda for ( int y = 0; y < height; y++ ) { - *ptr.u32++ = ne32( total ); + *ptr.u32++ = ne32( total + y * sizeof( uint32_t ) ); total += rle_row( NULL, &bgcount, imagedata, y, limit, check_transp, transparent ); }