Skip to content

Commit

Permalink
Change char_to_tchar() and tchar_to_char() to accept nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
starg2 committed Nov 20, 2018
1 parent ac48f69 commit 3a88e54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions timidity/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1749,12 +1749,12 @@ extern char *w32_utf16_to_utf8(const wchar_t *str)

extern TCHAR *char_to_tchar(const char *str)
{
return w32_utf8_to_utf16(str);
return w32_utf8_to_utf16(str ? str : "");
}

extern char *tchar_to_char(const TCHAR *str)
{
return w32_utf16_to_utf8(str);
return w32_utf16_to_utf8(str ? str : _T(""));
}

#else
Expand Down

0 comments on commit 3a88e54

Please sign in to comment.