Export to GitHub

boblight - issue #44

width and height swapped in CLight::SetScanRange


Posted on Jul 26, 2012 by Helpful Hippo

Code found in boblight_client.cpp Line 249.

m_hscanscaled[0] = Round32(m_hscan[0] / 100.0 * ((float)height - 1));
m_hscanscaled[1] = Round32(m_hscan[1] / 100.0 * ((float)height - 1));
m_vscanscaled[0] = Round32(m_vscan[0] / 100.0 * ((float)width  - 1));
m_vscanscaled[1] = Round32(m_vscan[1] / 100.0 * ((float)width  - 1));

VScan should be width, and vice versa.

Comment #1

Posted on Jul 30, 2012 by Quick Cat

Hm, and nobody noticed :)

Comment #2

Posted on Jul 30, 2012 by Helpful Hippo

Its not a issue if you always call with width==height, eg. SetScanRange(size,size)

Comment #3

Posted on Jul 30, 2012 by Quick Cat

Fixed in r445.

Comment #4

Posted on Jul 30, 2012 by Quick Cat

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Defect Priority-Medium