Export to GitHub

py-lepton - issue #4

copy&paste error in lepton/emittermodule.c (?)


Posted on Oct 7, 2009 by Swift Cat

What steps will reproduce the problem?

cat lepton/emittermodule.c | grep -C 1 '"deviation"'

What is the expected output? What do you see instead? expected: [...] return (PyObject *)ParticleRefObject_New(NULL, &self->ptemplate);
} else if (!strcmp(name, "deviation")) {

return (PyObject *)ParticleRefObject_New(NULL, &self->pdeviation);

    return (PyObject *)ParticleRefObject_New(NULL, &self->ptemplate);    
} else if (!strcmp(name, "deviation")) {
    return (PyObject *)ParticleRefObject_New(NULL, &self->pdeviation);   

instead: [...] return (PyObject *)ParticleRefObject_New(NULL, &self->ptemplate);
} else if (!strcmp(name, "deviation")) {

return (PyObject *)ParticleRefObject_New(NULL, &self->ptemplate);

    return (PyObject *)ParticleRefObject_New(NULL, &self->ptemplate);    
} else if (!strcmp(name, "deviation")) {
    return (PyObject *)ParticleRefObject_New(NULL, &self->ptemplate);    

What version of the product are you using? On what operating system?

latest svn checkout (rev 242)

Please provide any additional information below.

patch attached to this report I hope I'm not fixing a non-bug here :D

Attachments

Comment #1

Posted on Nov 4, 2009 by Swift Camel

Good catch, I'll add a unit test and apply your patch for the next beta.

Thanks!

Status: Started

Labels:
Type-Defect Priority-High