Skip to content

Unexpected behavior when performing operations involving multiple window reads #12

@MMukundi

Description

@MMukundi

Reproduction:

int main() {
    // -- SNIP --
    win.fill(1);
    std::vector<int> result(25);

    // Problem here:
    4*win(1,{0,0},{4,4})*win(1,{0,0},{4,4}) >> result.data();

    win.flush();
    // -- SNIP --
}

Expected behavior:

result[0] == 4

Observed behavior:

result[0] == 64

Temporary solution:

    // Quick fix; add parenthesis around the window operations
    4*(win(1,{0,0},{4,4})*win(1,{0,0},{4,4}))>> result.data();

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