1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 02:13:01 +01:00

fixed bug

This commit is contained in:
Jfreegman 2013-11-24 16:05:04 -05:00
parent 81230295cc
commit d47429ecb7

View File

@ -117,10 +117,8 @@ void alert_window(ToxWindow *self)
/* case-insensitive string compare function for use with qsort - same return logic as strcmp */ /* case-insensitive string compare function for use with qsort - same return logic as strcmp */
int name_compare(const void *nick1, const void *nick2) int name_compare(const void *nick1, const void *nick2)
{ {
int len_s = strlen((const char *) nick1); char s[strlen((const char *) nick1) + 1];
int len_t = strlen((const char *) nick2); char t[strlen((const char *) nick2) + 1];
char s[len_s];
char t[len_t];
strcpy(s, (const char *) nick1); strcpy(s, (const char *) nick1);
strcpy(t, (const char *) nick2); strcpy(t, (const char *) nick2);