diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-09-25 15:00:07 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-09-25 15:04:56 +0400 |
commit | 34abb614f1344a63b1c1411bb891c98bd93fb2a2 (patch) | |
tree | a3b5be59cc1e53ce8625f52c98414ba869982e15 /source/blender/python | |
parent | 69e41d473c982488f9aa7582cb787e24ed198a9f (diff) |
Fix ghash comparator used by translation
It now need to return bool whether element matched or not.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_app_translations.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c index 109e5606037..72ae7bb0e23 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -86,7 +86,7 @@ static unsigned int _ghashutil_keyhash(const void *ptr) return hash ^ BLI_ghashutil_strhash(key->msgid); } -static int _ghashutil_keycmp(const void *a, const void *b) +static bool _ghashutil_keycmp(const void *a, const void *b) { const GHashKey *A = a; const GHashKey *B = b; @@ -94,8 +94,8 @@ static int _ghashutil_keycmp(const void *a, const void *b) /* Note: comparing msgid first, most of the time it will be enough! */ int cmp = BLI_ghashutil_strcmp(A->msgid, B->msgid); if (cmp == 0) - return BLI_ghashutil_strcmp(A->msgctxt, B->msgctxt); - return cmp; + return BLI_ghashutil_strcmp(A->msgctxt, B->msgctxt) == 0; + return false; } static void _ghashutil_keyfree(void *ptr) |