From bd69c8da183c3a4be8c6764deb23258fc5f80d3c Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Sat, 4 Oct 2014 17:01:02 -0400 Subject: [PATCH] small fix --- src/friendlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/friendlist.c b/src/friendlist.c index 39d5706..fb16543 100644 --- a/src/friendlist.c +++ b/src/friendlist.c @@ -413,8 +413,8 @@ void friendlist_onFriendAdded(ToxWindow *self, Tox *m, int32_t num, bool sort) strcpy(Friends.list[i].name, UNKNOWN_NAME); Friends.list[i].namelength = strlen(UNKNOWN_NAME); } else { /* Enforce toxic's maximum name length */ - Friends.list[i].namelength = len; snprintf(Friends.list[i].name, sizeof(Friends.list[i].name), "%s", tempname); + Friends.list[i].namelength = strlen(Friends.list[i].name); } if (i == Friends.max_idx)