Fix wrong binary logic
authorColin Leroy <colin@colino.net>
Thu, 5 Jun 2014 15:15:18 +0000 (17:15 +0200)
committerColin Leroy <colin@colino.net>
Thu, 5 Jun 2014 15:15:18 +0000 (17:15 +0200)
src/avatars.c
src/procheader.c

index a68286d85478b18d1905234fdc2cfe5ba176f5f0..b6177b1905da2c26b7515c42bee0e28ae362be4d 100644 (file)
@@ -60,7 +60,7 @@ gboolean avatars_internal_rendering_hook(gpointer source, gpointer data)
        AvatarRender *avatarr = (AvatarRender *)source;
        gchar *aface;
 
        AvatarRender *avatarr = (AvatarRender *)source;
        gchar *aface;
 
-       if (!(prefs_common.enable_avatars | AVATARS_ENABLE_RENDER)) {
+       if (!(prefs_common.enable_avatars & AVATARS_ENABLE_RENDER)) {
                debug_print("Internal rendering of avatars is disabled");
                return FALSE;
        }
                debug_print("Internal rendering of avatars is disabled");
                return FALSE;
        }
index fad05e1bf426cacd27a8dd56b59f33db43572077..330a3107a0d8f4adb1ce3a1a1b6a51b189b2f209 100644 (file)
@@ -533,9 +533,9 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
        
        msginfo->inreplyto = NULL;
 
        
        msginfo->inreplyto = NULL;
 
-       if (avatar_hook_id == 0 && (prefs_common.enable_avatars | AVATARS_ENABLE_CAPTURE)) {
+       if (avatar_hook_id == 0 && (prefs_common.enable_avatars & AVATARS_ENABLE_CAPTURE)) {
                avatar_hook_id = hooks_register_hook(AVATAR_HEADER_UPDATE_HOOKLIST, avatar_from_some_face, NULL);
                avatar_hook_id = hooks_register_hook(AVATAR_HEADER_UPDATE_HOOKLIST, avatar_from_some_face, NULL);
-       } else if (avatar_hook_id != 0 && !(prefs_common.enable_avatars | AVATARS_ENABLE_CAPTURE)) {
+       } else if (avatar_hook_id != 0 && !(prefs_common.enable_avatars & AVATARS_ENABLE_CAPTURE)) {
                hooks_unregister_hook(AVATAR_HEADER_UPDATE_HOOKLIST, avatar_hook_id);
                avatar_hook_id = 0;
        }
                hooks_unregister_hook(AVATAR_HEADER_UPDATE_HOOKLIST, avatar_hook_id);
                avatar_hook_id = 0;
        }