#1 2019-10-25 15:34:08

KevinChen
Member
Registered: 2016-09-10
Posts: 10

Issue on update of MoveSmall() in SynCommons.pas

Hi,

I have merged this update but my test result on the JSON content returned from Oracle DB was not correct as before.
The difference was that the column with ftCurrency data type lost its value in JSON.
After trace, I found the problem was caused by following:

procedure TTextWriter.AddFloatStr(P: PUTF8Char);

old:    {$ifdef FPC}Move{$else}MoveFast{$endif}(P^,B^,L);
new:   MoveSmall(P,B+1,L);

If I revise the new to MoveSmall(P,B,L), the correct JSON result is back.
I'm not good at pointer technique, any help would be appreciated.

Offline

#2 2019-10-25 16:28:11

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,272
Website

Re: Issue on update of MoveSmall() in SynCommons.pas

Nice catch!

Your fix was correct.
I just merged it.

Thanks for the feedback!

Offline

Board footer

Powered by FluxBB