leadedge / ofxNDI

An Openframeworks addon to allow sending and receiving images over a network using the NewTek Network Device Protocol.
GNU General Public License v3.0
134 stars 50 forks source link

fix warning - array bounds #27

Closed dimitre closed 2 years ago

dimitre commented 2 years ago

Array index 2 is past the end of the array (which contains 2 elements)

leadedge commented 2 years ago

Well spotted. This is not good.

But actually the problem is in ofxNDIsender.h. I made a change from 2 pbos to 3 but did not update the the pbo array declaration. I don't know how it worked at all. But anyway, that's the only change necessary.

I am going through the whole addon at the moment and will fix that.

At the same time I will comment out the unused constant that you found. This could be useful at some other time.

I hope you have a good Christmas break.

dimitre commented 2 years ago

Thanks! You too have a nice Christmas break :)

leadedge commented 2 years ago

Changes made and checked