mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-23 15:33:25 +01:00
couple fixes
This commit is contained in:
parent
7e0bc7768b
commit
2057e7bc4f
@ -207,6 +207,9 @@ static void chat_onFileData(ToxWindow *self, Tox *m, int num, uint8_t filenum, u
|
||||
|
||||
// we have a problem here, but don't let it segfault
|
||||
if (file_to_save == NULL) {
|
||||
wattron(ctx->history, COLOR_PAIR(RED));
|
||||
wprintw(ctx->history, "* Error writing to file.\n");
|
||||
wattroff(ctx->history, COLOR_PAIR(RED));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ void cmd_nick(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MA
|
||||
|
||||
if (len > TOXIC_MAX_NAME_LENGTH) {
|
||||
nick[TOXIC_MAX_NAME_LENGTH] = L'\0';
|
||||
len = TOXIC_MAX_NAME_LENGTH;
|
||||
len = TOXIC_MAX_NAME_LENGTH - 1;
|
||||
}
|
||||
|
||||
tox_setname(m, nick, len+1);
|
||||
|
@ -152,4 +152,4 @@ bool valid_nick(uint8_t *nick)
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -35,4 +35,4 @@ int name_compare(const void *nick1, const void *nick2);
|
||||
- cannot be empty
|
||||
- cannot start with a space
|
||||
- must not contain contiguous spaces */
|
||||
bool valid_nick(uint8_t *nick);
|
||||
bool valid_nick(uint8_t *nick);
|
||||
|
Loading…
Reference in New Issue
Block a user