Skip to content

Bad translate for some drc files #13

Description

@goroka

It omits the translate for Y and Z coordinates.

The bug is in Unsafe.toFloatArray() — loop condition i < ret.length should be d <
ret.length (line 159). i increments by 4 (byte offset) while ret.length is the
float count (e.g. 3 for XYZ), so only the first component gets the quantization
offset applied.

// Bug (line 159):
for (int i = 0, d = 0; i < ret.length; i += 4, d++)
// Fix:
for (int i = 0, d = 0; d < ret.length; i += 4, d++)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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