On 04/18/2013 05:35 PM, D. Michael McIntyre wrote:
> On 04/18/2013 11:41 AM, Holger Marzen wrote:
>>     pluginLatency +=
>>       m_instrumentMixer->getPluginLatency((unsigned int) * 
>> connections.begin() - 1);
>>
>> and it looks like the bug has been gone.
>
> Nah, trying to start iterating from before begin() can't be right, and
> is likely to end badly.

   That's not what it is doing.  The asterisk is dereferencing the 
iterator which is apparently pointing to an integer of some sort.  So we 
have this:

   (unsigned int)(*connections.begin()) - 1

And that might indeed be perfectly ok.  Unless, of course, 
(*connections.begin()) can be zero.  Then there'll be a bit of trouble.

   So, I would recommend testing this fix in situations that would 
exercise the range of values that might be stored in the connections 
container.  Is this one of those situations where the numbers in 
connections are UI numbers (starting with 1) while the numbers in the 
code start with 0?  That might be all that's going on, and in that case, 
Holger's change is valid.

   But I'm not looking at the code, so....

Ted.

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to