The wcswidth() function was silently failing when trying to convert
messages containing a newline to a widechar buffer which resulted
in the message showing up as an empty line. we now fall back
to using strlen to get the width of the string, which might still
cause minor display bugs when the message contains unicode, but is
still better than losing messages entirely.
This fixes a bug where printing a bunch of UTF8 chars with glyphs
that have a size > 1 would make the entire chat window disappear.
It also fixes an issue where said UTF8 chars would be truncated
and generally not display correctly.
This will alert the user when the first six bytes of a new
contact's public key is the same as any other contact in
their list. These 6 bytes are used elsewhere in toxic for
unique identification.
Also did a small refactor regarding the KEY_IDENT_BYTES
define
There is no check at all that the types of externs actually match the
type of the definition. This just accidentally was not a problem, but now
the compiler helps a bit in keeping it that way.
This fixes a rare but possible scenario where a name@domain lookup that's
longer than a tox id won't work. It also fixes custom messages for domain
lookups
`ncuses-6.3` added printf-style function attributes and now makes
it easier to catch cases when user input is used in palce of format
string when built with CFLAGS=-Werror=format-security:
toxic/src/game_chess.c:1633:63: error:
format not a string literal and no format arguments [-Werror=format-security]
1633 | mvwprintw(win, board->y_bottom_bound + 2, x_mid, state->status_message);
| ~~~~~^~~~~~~~~~~~~~~~
Let's wrap all the missing places with "%s" format.
- Add large square and rectangle window types
- Remove forced small windows
- Fit game of life to largest possible window type
- Hide cursor in game of life when game is running