Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please Check for access-violation in camera.cuh::update #14

Open
GoogleCodeExporter opened this issue Dec 12, 2015 · 0 comments
Open

Please Check for access-violation in camera.cuh::update #14

GoogleCodeExporter opened this issue Dec 12, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link


Hi, please check if you write out of m_data. 
It does here, overwriting other stuff, so I appended

&& i < MAX_BOKEH_DATA-1;


I would be glad if you could provide me with some information how to correct it 
properly, since I have no clue what Update does .

Thanks
Christoph

HOD void Update(const float& FStop)
{
// Update bokeh
    int Ns = (int)m_NoBlades;

    if ((Ns >= 3) && (Ns <= 6))
    {
        float w = m_Rotation * PI_F / 180.0f, wi = (2.0f * PI_F) / (float)Ns;

        Ns = (Ns + 2) * 2;

        for (int i = 0; i < Ns  && i < MAX_BOKEH_DATA-1; i += 2)
        {
            m_Data[i]       = cos(w);
            m_Data[i + 1]   = sin(w);
            w += wi;
        }
    }
}

Original issue reported on code.google.com by [email protected] on 1 Jun 2012 at 9:51

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

No branches or pull requests

1 participant