From da15a59717fcf824569cbd647641c572405eb678 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 5 Apr 2021 19:29:00 +0200 Subject: omit charset from en_US.UTF-8 env variable when picking i18n strings, handle no preference case --- src/json/json_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/json') diff --git a/src/json/json_helper.c b/src/json/json_helper.c index e8c6d4cbc..c3788f863 100644 --- a/src/json/json_helper.c +++ b/src/json/json_helper.c @@ -419,7 +419,8 @@ parse_i18n_string (void *cls, val = json_object_get (root, ctx->field); - if (NULL != i18n) + if ( (NULL != i18n) && + (NULL != ctx->lp) ) { double best = 0.0; json_t *pos; -- cgit v1.2.3