mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-24 17:53:25 +01:00
null check just incase
This commit is contained in:
parent
9e2fde8d84
commit
da6ef159e6
@ -422,7 +422,11 @@ void prompt_init_statusbar(ToxWindow *self, Tox *m)
|
|||||||
uint8_t statusmsg[MAX_STR_SIZE];
|
uint8_t statusmsg[MAX_STR_SIZE];
|
||||||
strcpy(ver, TOXICVER);
|
strcpy(ver, TOXICVER);
|
||||||
uint8_t *toxic_ver = strtok(ver, "_");
|
uint8_t *toxic_ver = strtok(ver, "_");
|
||||||
|
|
||||||
|
if (toxic_ver != NULL)
|
||||||
snprintf(statusmsg, MAX_STR_SIZE, "Toxing on Toxic v.%s", toxic_ver);
|
snprintf(statusmsg, MAX_STR_SIZE, "Toxing on Toxic v.%s", toxic_ver);
|
||||||
|
else
|
||||||
|
snprintf(statusmsg, MAX_STR_SIZE, "Toxing on Toxic hacker edition");
|
||||||
|
|
||||||
m_set_statusmessage(m, statusmsg, strlen(statusmsg) + 1);
|
m_set_statusmessage(m, statusmsg, strlen(statusmsg) + 1);
|
||||||
snprintf(statusbar->statusmsg, sizeof(statusbar->statusmsg), "%s", statusmsg);
|
snprintf(statusbar->statusmsg, sizeof(statusbar->statusmsg), "%s", statusmsg);
|
||||||
|
Loading…
Reference in New Issue
Block a user