Skip to content

Commit

Permalink
Fixed #7488: Invalid real to string cast
Browse files Browse the repository at this point in the history
(cherry picked from commit 6ada476)
  • Loading branch information
AlexPeshkoff committed Mar 9, 2023
1 parent 9356f87 commit 8ceae56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jrd/cvt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,6 @@ UCHAR CVT_get_numeric(const UCHAR* string, const USHORT length, SSHORT* scale, v
if ((local_scale > MAX_SCHAR) || (local_scale < MIN_SCHAR))
over = true;

*scale = local_scale;

if ((!over) && ((p < end) || // there is an exponent
((value < 0) && (sign != -1)))) // MAX_SINT64+1 wrapped around
{
Expand All @@ -285,6 +283,8 @@ UCHAR CVT_get_numeric(const UCHAR* string, const USHORT length, SSHORT* scale, v
return dtype_double;
}

*scale = local_scale;

if (over)
{
thread_db* tdbb = JRD_get_thread_data();
Expand Down

0 comments on commit 8ceae56

Please # to comment.