mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Don't crash if there's no prefixes (botti doesn't) when loading module.
Patch by aldem-irssi@aldem.net git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2607 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
7d88170b0b
commit
265ecbc74d
@ -64,14 +64,17 @@ static char *module_get_root(const char *name, char **prefixes)
|
||||
int len;
|
||||
|
||||
/* skip any of the prefixes.. */
|
||||
if (prefixes != NULL) {
|
||||
while (*prefixes != NULL) {
|
||||
len = strlen(*prefixes);
|
||||
if (strncmp(name, *prefixes, len) == 0 && name[len] == '_') {
|
||||
if (strncmp(name, *prefixes, len) == 0 &&
|
||||
name[len] == '_') {
|
||||
name += len+1;
|
||||
break;
|
||||
}
|
||||
prefixes++;
|
||||
}
|
||||
}
|
||||
|
||||
/* skip the _core part */
|
||||
len = strlen(name);
|
||||
|
Loading…
Reference in New Issue
Block a user