diff options
Diffstat (limited to 'base/gsparam.c')
-rw-r--r-- | base/gsparam.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/base/gsparam.c b/base/gsparam.c index a5741565..e8a2f0c5 100644 --- a/base/gsparam.c +++ b/base/gsparam.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2020 Artifex Software, Inc. +/* Copyright (C) 2001-2021 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -200,7 +200,7 @@ param_coerce_typed(gs_param_typed_value * pvalue, gs_param_type req_type, } case gs_param_type_float: { - float fl = (float)pvalue->value.l; + float fl = (float)pvalue->value.i; pvalue->value.f = fl; goto ok; } @@ -274,9 +274,9 @@ param_coerce_typed(gs_param_typed_value * pvalue, gs_param_type req_type, } case gs_param_type_int: { - int int1 = (int)pvalue->value.l; + int int1 = (int)pvalue->value.i64; #if ARCH_SIZEOF_INT < 8 /* sizeof(int64_t) */ - if (pvalue->value.i64 != (int)int1) + if (pvalue->value.i64 != (int64_t)int1) return_error(gs_error_rangecheck); #endif pvalue->value.i = int1; @@ -309,9 +309,9 @@ param_coerce_typed(gs_param_typed_value * pvalue, gs_param_type req_type, } case gs_param_type_long: { - long l = (long)pvalue->value.i64; + long l = (long)pvalue->value.z; #if ARCH_SIZEOF_LONG < 8 /* sizeof(int64_t) */ - if (pvalue->value.i64 != (int64_t)l) + if (pvalue->value.z != (size_t)l) return_error(gs_error_rangecheck); #endif pvalue->value.l = l; @@ -319,9 +319,9 @@ param_coerce_typed(gs_param_typed_value * pvalue, gs_param_type req_type, } case gs_param_type_int: { - int int1 = (int)pvalue->value.l; + int int1 = (int)pvalue->value.z; #if ARCH_SIZEOF_INT < 8 /* sizeof(int64_t) */ - if (pvalue->value.i64 != (int)int1) + if (pvalue->value.z != (size_t)int1) return_error(gs_error_rangecheck); #endif pvalue->value.i = int1; @@ -329,7 +329,7 @@ param_coerce_typed(gs_param_typed_value * pvalue, gs_param_type req_type, } case gs_param_type_float: { - float fl = (float)pvalue->value.i64; + float fl = (float)pvalue->value.z; pvalue->value.f = fl; goto ok; } |