mirror of
https://github.com/irssi/irssi.git
synced 2024-10-27 05:20:20 -04:00
module_find_id() and module_find_id_str() didn't work right if the
requested module didn't have the specified uniqid. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@464 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
796d51afe4
commit
2afaadb2d7
@ -104,7 +104,8 @@ int module_find_id(const char *module, int uniqid)
|
||||
if (ret != -1) {
|
||||
/* check that module matches */
|
||||
ids = g_hash_table_lookup(idlookup, module);
|
||||
if (ids == NULL || !g_hash_table_lookup_extended(ids, GINT_TO_POINTER(ret), &origkey, &id))
|
||||
if (ids == NULL || !g_hash_table_lookup_extended(ids, GINT_TO_POINTER(ret), &origkey, &id) ||
|
||||
GPOINTER_TO_INT(id) != uniqid)
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
@ -126,7 +127,8 @@ const char *module_find_id_str(const char *module, int uniqid)
|
||||
if (ret != NULL) {
|
||||
/* check that module matches */
|
||||
ids = g_hash_table_lookup(stridlookup, module);
|
||||
if (ids == NULL || !g_hash_table_lookup_extended(ids, GINT_TO_POINTER(ret), &origkey, &id))
|
||||
if (ids == NULL || !g_hash_table_lookup_extended(ids, GINT_TO_POINTER(ret), &origkey, &id) ||
|
||||
(GPOINTER_TO_INT(id) != uniqid))
|
||||
ret = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user