Skip to content

[Corrective Sky Surgery Q3]: Incorrect array length returned #119

Open
@ghost

Description

Prerequisites

Expected Behavior

Running display(array_length(src)) should return the height of the video/image.

Current Behavior

Correct values are only returned when HEIGHT is set between 300 and 500. For any values <300 or >500, display(array_length(src)) returns 300.

Failure Information (for bugs)

Steps to Reproduce

Run the code in Q3 of the mission: Expected result: 150, Actual result: 300

const WIDTH = 400;
const HEIGHT = 150;

function zoom(factor) {
    
    return (src, dest) => display(array_length(src));
}

install_filter(zoom(2));

set_dimensions(WIDTH, HEIGHT);
start();

Context

  • Version used: -
  • Browser Name and version: Firefox v93.0
  • Operating System and version (desktop or mobile): macOS Big Sur V11.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug[Category]minor[Priority]

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions