Fix casting warnings in screen.c / s_update() by casting al_get() twice to convert type and then size, instead of both at once.

This commit is contained in:
Ben Hoskings 2009-12-02 03:08:20 +11:00 committed by Suraj N. Kurapati
parent 517751f2a3
commit 1bd09bfd40

View File

@ -700,8 +700,8 @@ static void s_update( screen_t *scr, wchar_t *prompt )
for( j=start_pos; j<al_get_count( &o_line->text ); j++ )
{
wchar_t o = (wchar_t)al_get( &o_line->text, j );
int o_c = (int)al_get( &o_line->color, j );
wchar_t o = (wchar_t)(long)al_get( &o_line->text, j );
int o_c = (int)(long)al_get( &o_line->color, j );
if( !o )
@ -717,8 +717,8 @@ static void s_update( screen_t *scr, wchar_t *prompt )
}
else
{
wchar_t s = (wchar_t)al_get( &s_line->text, j );
int s_c = (int)al_get( &s_line->color, j );
wchar_t s = (wchar_t)(long)al_get( &s_line->text, j );
int s_c = (int)(long)al_get( &s_line->color, j );
if( o != s || o_c != s_c )
{
s_move( scr, &output, current_width, i );