summaryrefslogtreecommitdiffstats
path: root/gettext-tools/src/format-javascript.c
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2016-05-23 12:02:31 +0900
committerDaiki Ueno <ueno@gnu.org>2016-05-23 12:02:31 +0900
commit9920621eaa425905c52c13ee8a7fadc8d67913e3 (patch)
treee3e1c17bb3ea75c02c7e70d0fc87e34d3de0a7f2 /gettext-tools/src/format-javascript.c
parent6555704d4cd419c562e7a5b24aaf4190a79c284b (diff)
downloadexternal_gettext-9920621eaa425905c52c13ee8a7fadc8d67913e3.zip
external_gettext-9920621eaa425905c52c13ee8a7fadc8d67913e3.tar.gz
external_gettext-9920621eaa425905c52c13ee8a7fadc8d67913e3.tar.bz2
javascript: Fix format type compatibility check
* gettext-tools/src/format-javascript.c (format_check): Check if the two argument types are the same.
Diffstat (limited to 'gettext-tools/src/format-javascript.c')
-rw-r--r--gettext-tools/src/format-javascript.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gettext-tools/src/format-javascript.c b/gettext-tools/src/format-javascript.c
index c9c3d32..42f2dce 100644
--- a/gettext-tools/src/format-javascript.c
+++ b/gettext-tools/src/format-javascript.c
@@ -381,9 +381,10 @@ format_check (void *msgid_descr, void *msgstr_descr, bool equality,
{
if (spec1->numbered[i].number == spec2->numbered[j].number)
{
- if (!equality
- && (spec1->numbered[i].type == FAT_ANY
- || spec2->numbered[i].type == FAT_ANY))
+ if (!(spec1->numbered[i].type == spec2->numbered[j].type
+ || (!equality
+ && (spec1->numbered[i].type == FAT_ANY
+ || spec2->numbered[i].type == FAT_ANY))))
{
if (error_logger)
error_logger (_("format specifications in '%s' and '%s' for argument %u are not the same"),