1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-27 16:16:44 +02:00

Lots of bug fixes and general code cleanup

This commit is contained in:
Jfreegman
2015-08-27 03:38:08 -04:00
parent 92d76c7f99
commit 11701d22a1
19 changed files with 247 additions and 173 deletions

View File

@ -568,7 +568,7 @@ ToxWindow *get_window_ptr(int i)
{
ToxWindow *toxwin = NULL;
if (i >= 0 && i <= MAX_WINDOWS_NUM && windows[i].active)
if (i >= 0 && i < MAX_WINDOWS_NUM && windows[i].active)
toxwin = &windows[i];
return toxwin;
@ -595,7 +595,7 @@ void kill_all_windows(Tox *m)
if (windows[i].is_chat)
kill_chat_window(&windows[i], m);
else if (windows[i].is_groupchat)
close_groupchat(&windows[i], m, i);
close_groupchat(&windows[i], m, windows[i].num);
}
kill_prompt_window(prompt);