Skip to content

Commit

Permalink
Evade nuisance casting warnings in MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill-Gray committed Dec 12, 2021
1 parent aff28f2 commit e4fea65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pdcurses/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,14 @@ static int _int32_to_wchar_array( wchar_t *obuff, const int obuffsize, const int
#ifdef WCHAR_T_IS_16_BITS
if( *wint >= 0x10000) /* make surrogate pair */
{
obuff[i++] = (wchar_t)0xd800 + (*wint >> 10);
obuff[i++] = (wchar_t)( 0xd800 + (*wint >> 10));
if( i < obuffsize)
obuff[i++] = (wchar_t)0xdc00 + (*wint & 0x3ff);
obuff[i++] = (wchar_t)( 0xdc00 + (*wint & 0x3ff));
wint++;
}
else
#endif
obuff[i++] = *wint++;
obuff[i++] = (wchar_t)*wint++;
}
if( i < obuffsize)
obuff[i++] = '\0';
Expand Down

0 comments on commit e4fea65

Please sign in to comment.