mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08:00
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:
parent
517751f2a3
commit
1bd09bfd40
8
screen.c
8
screen.c
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue
Block a user