caseman / py-lepton

Automatically exported from code.google.com/p/py-lepton
MIT License
2 stars 0 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by eruq...@gmail.com on 7 Oct 2009 at 5:18

Attachments:

GoogleCodeExporter commented 9 years ago
Good catch, I'll add a unit test and apply your patch for the next beta. 

Thanks!

Original comment by casey.du...@gmail.com on 4 Nov 2009 at 5:45