Skip to content

Serious but small bug in serialization of kOS.Suffixed.Direction #3161

@ChrisInBed

Description

@ChrisInBed

It is a very simple bug in kOS\Suffixed\Direction.cs, line 263:

        public override void LoadDump(Dump dump)
        {
            Rotation = new Quaternion(
                (float)Convert.ToDouble(dump[DumpQuaternionW]),
                (float)Convert.ToDouble(dump[DumpQuaternionX]),
                (float)Convert.ToDouble(dump[DumpQuaternionY]),
                (float)Convert.ToDouble(dump[DumpQuaternionZ])
                );
        }

Wrong order of arguments, which should be:

        public override void LoadDump(Dump dump)
        {
            Rotation = new Quaternion(
                (float)Convert.ToDouble(dump[DumpQuaternionX]),
                (float)Convert.ToDouble(dump[DumpQuaternionY]),
                (float)Convert.ToDouble(dump[DumpQuaternionZ]),
                (float)Convert.ToDouble(dump[DumpQuaternionW])
                );
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions