libtiff: rational_precision2double.c: Fix issue from Coverity Scan.

From 692870df2274ee54153bf9f40ae2e14bbdd596da Mon Sep 17 00:00:00 2001
From: Su_Laus <[EMAIL REDACTED]>
Date: Thu, 6 Oct 2022 14:37:38 +0200
Subject: [PATCH] rational_precision2double.c: Fix issue from Coverity Scan.

---
 test/rational_precision2double.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/rational_precision2double.c b/test/rational_precision2double.c
index df01e5a3..8312ef9b 100644
--- a/test/rational_precision2double.c
+++ b/test/rational_precision2double.c
@@ -528,7 +528,7 @@ write_test_tiff(TIFF* tif, const char* filenameRead, int blnAllCustomTags) {
 			tFieldName = tFieldArray->fields[i].field_name;
 			pVoid = NULL;
 
-			if (tType == TIFF_RATIONAL && tFieldBit == FIELD_CUSTOM) {
+			if ((tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) && tFieldBit == FIELD_CUSTOM) {
 				/*-- dependent on set_field_type write value --*/
 				switch (tSetFieldType) {
 					case TIFF_SETGET_FLOAT:
@@ -818,7 +818,7 @@ write_test_tiff(TIFF* tif, const char* filenameRead, int blnAllCustomTags) {
 			pVoid = NULL;
 			auxDblUnion.dbl = 0;
 
-			if (tType == TIFF_RATIONAL && tFieldBit == FIELD_CUSTOM) {
+			if ((tType == TIFF_RATIONAL || tType == TIFF_SRATIONAL) && tFieldBit == FIELD_CUSTOM) {
 				/*-- dependent on set_field_type read value --*/
 				switch (tSetFieldType) {
 					case TIFF_SETGET_FLOAT: