Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csharp负数问题 #4

Open
spaceming opened this issue Dec 16, 2022 · 2 comments
Open

csharp负数问题 #4

spaceming opened this issue Dec 16, 2022 · 2 comments

Comments

@spaceming
Copy link

请问负数是不是不支持?测试发现float和double都不支持
OutputStream.cs
public void WriteFloat(int fieldIndex, float value)
{
if (value < float.Epsilon)//这里直接返回了
{
return;
}

        WriteTag(fieldIndex, WireFormat.WireType.Fixed32);

        CheckBuffer(4);
        if(value < 0){
            value = value;
        }
        FastBitConverter.GetBytes(_buffer, _pos, value);
        _pos += 4;
    }
@spaceming
Copy link
Author

发现已经修复了 手头版本不是最新的 抱歉。

@spaceming
Copy link
Author

可以的话打一个最新版本的tag/release
2.0.0有问题

@spaceming spaceming reopened this Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant