ERangeError in MemUtils.pas

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
NineBerry
Posts: 11
Joined: Tue 02 Sep 2008 14:54

ERangeError in MemUtils.pas

Post by NineBerry » Thu 11 Sep 2008 15:31

During development, we make sure, all code we use is compiled with Range Checking and Overflow Checking on.

When reading from a Dataset with certain special characters (like the Euro Sign) in the column content, a statement in MemUtils.pas will throw an ERangeError when compiled with Overflow Checking on.

To circumvent this error, change line 1193 from

Code: Select all

    PWord(Cardinal(Dest) + DestIdx + Result)^ := wc;
to

Code: Select all

    PWord(Cardinal(Dest) + DestIdx + Result)^ := Word(wc);
Please include this change in the next release.

Thanks

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 12 Sep 2008 07:38

We'll include this fix in the next IBDAC release.

NineBerry
Posts: 11
Joined: Tue 02 Sep 2008 14:54

Post by NineBerry » Fri 12 Sep 2008 09:36

Thank you very much :D

Post Reply