anymore1113 / superobject

Automatically exported from code.google.com/p/superobject
0 stars 0 forks source link

The func PutN in class TSuperTableString is wrong #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, it is really hard to visit Google in China now.

First of all, thanks for everyone who worked on superobject, it is an awesome 
unit for parsing json text.

I read the code and found that may be it is wrong code in func PutN of 
TSuperTableString.

Here is the code on line 5826:

procedure TSuperTableString.PutN(const k: SOString; const value: ISuperObject);
begin
  if value <> nil then
    PutO(k, TSuperObject.Create(stNull)) else
    PutO(k, value);
end;

And I thought it would be right like this:

procedure TSuperTableString.PutN(const k: SOString; const value: ISuperObject);
begin
  if value <> nil then
    PutO(k, value) else
    PutO(k, TSuperObject.Create(stNull));
end;

Regards

Original issue reported on code.google.com by Yufeiy...@gmail.com on 5 Sep 2014 at 5:34