1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-23 10:23:26 +01:00

Fixed emptying avatar_path if the path is too long.

This commit is contained in:
dantok 2015-01-25 20:17:32 +01:00
parent 89f200e870
commit a561ef8c49

View File

@ -289,7 +289,7 @@ int settings_load(struct user_settings *s, const char *patharg)
if ( config_setting_lookup_string(setting, tox_strings.avatar_path, &str) ) {
snprintf(s->avatar_path, sizeof(s->avatar_path), "%s", str);
int len = strlen(s->avatar_path);
int len = strlen(str);
if (len >= sizeof(s->avatar_path))
s->avatar_path[0] = '\0';