lvzixun / sproto-Csharp

A pure C# implementation of sproto.
140 stars 53 forks source link

fill_size的参数判断是否有问题 #8

Closed monkeylight closed 8 years ago

monkeylight commented 8 years ago

文件 SprotoTypeSerialize.cs 第82行的限制是否有问题,为何不允许sz为0的情况,例如空字符串

    private void fill_size(int sz) {
        if (sz <= 0)
            SprotoTypeSize.error ("fill invaild size.");

        this.write_uint32 ((UInt32)sz);
    }
lvzixun commented 8 years ago

恩,确实是。thanks ;)