Backport PR#2400 to fix interation for non-decimal strings (rhbz#2045178)

This commit is contained in:
Davide Cavalca 2022-03-08 12:51:37 -08:00
parent 30e9e397e4
commit a79675f24d
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,11 @@
diff -Naur a/src/jv.c b/src/jv.c
--- a/src/jv.c 2022-03-08 12:42:41.169813593 -0800
+++ b/src/jv.c 2022-03-08 12:43:28.189080921 -0800
@@ -308,6 +308,7 @@
n->refcnt = JV_REFCNT_INIT;
n->literal_data = NULL;
decContext *ctx = DEC_CONTEXT();
+ decContextClearStatus(ctx, DEC_Conversion_syntax);
decNumberFromString(&n->num_decimal, literal, ctx);
n->num_double = NAN;

View File

@ -1,6 +1,6 @@
Name: jq
Version: 1.6
Release: 11%{?dist}
Release: 12%{?dist}
Summary: Command-line JSON processor
License: MIT and ASL 2.0 and CC-BY and GPLv3
@ -8,6 +8,8 @@ URL: http://stedolan.github.io/jq/
Source0: https://github.com/stedolan/jq/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
# Backport of PR#1752 for RHBZ#2008979
Patch0: jq-decimal-literal-number.patch
# Backport of PR#2400 for RHBZ#2017285
Patch1: jq-fix-non-decimal-string.patch
BuildRequires: gcc
BuildRequires: flex
@ -101,6 +103,9 @@ make check
%changelog
* Tue Mar 08 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 1.6-12
- Backport PR#2400 to fix iteration for non-decimal strings (rhbz#2017285)
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild