Skip to content

Int overflow, then the result can be negative, so function breaked #8

@nguyenbantran

Description

@nguyenbantran

Dear @ifesdjeen,
In this line, int firstFireOffset = (int) (firstDelay / resolution), firstFireOffset maybe is negative if firstDelay is so large.

I think all variable around should be long, and we just need cast to int when access wheel[index].
Please review this problem.

int firstFireOffset = (int) (firstDelay / resolution);

Thanks and best regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions