mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
fix off by one error when extracting e.g. fe from fe_silc
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4553 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
cafa6aa0f4
commit
d700521273
@ -97,7 +97,7 @@ static char *module_get_sub(const char *name, const char *root)
|
||||
strcmp(name+rootlen, "_core") == 0)
|
||||
return g_strdup("core");
|
||||
|
||||
if (namelen+1 > rootlen && name[namelen-rootlen-1] == '_' &&
|
||||
if (namelen > rootlen && name[namelen-rootlen-1] == '_' &&
|
||||
strcmp(name+namelen-rootlen, root) == 0)
|
||||
return g_strndup(name, namelen-rootlen-1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user