[fpc-pascal] fpreport rangeerrors with TFPReportColor
Michael Van Canneyt
michael at freepascal.org
Wed Feb 21 23:53:32 CET 2018
On Wed, 21 Feb 2018, Mattias Gaertner wrote:
> On Wed, 21 Feb 2018 19:54:55 +0000
> Graeme Geldenhuys <mailinglists at geldenhuys.co.uk> wrote:
>> > Because UInt32 is not a JSON dataformat.
>> Well, then I'll say that FPC's JSON needs to be extended to support
>> UInt32, as it is a perfectly valid Object Pascal data type.
> How should FPC's JSON support something, that is not supported by
The problem is not in JSON.
if written properly.
FPC's JSON supports Int64 and even QWord in FPC, so a UInt32 is definitely supported.
If the colors (a UInt32) is currently written as Longint (signed 32-bit)
then of course a range check will follow, and this needs to be fixed.
The easiest solution is simply to read/write it as Int64.
More information about the fpc-pascal