gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash/backend sound_handler_sdl.cpp


From: strk
Subject: Re: [Gnash-commit] gnash/backend sound_handler_sdl.cpp
Date: Mon, 18 Sep 2006 17:09:52 +0200

On Mon, Sep 18, 2006 at 02:34:27PM +0000, Vitaly Alexeev wrote:
> CVSROOT:      /sources/gnash
> Module name:  gnash
> Changes by:   Vitaly Alexeev <alexeev>        06/09/18 14:34:27
> 
> Modified files:
>       backend        : sound_handler_sdl.cpp 
> 
> Log message:
>       fixed out of range bug
> 
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.cpp?cvsroot=gnash&r1=1.18&r2=1.19
> 
> Patches:
> Index: sound_handler_sdl.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.cpp,v
> retrieving revision 1.18
> retrieving revision 1.19
> diff -u -b -r1.18 -r1.19
> --- sound_handler_sdl.cpp     28 Aug 2006 22:56:25 -0000      1.18
> +++ sound_handler_sdl.cpp     18 Sep 2006 14:34:27 -0000      1.19
> @@ -87,7 +87,7 @@
>               if (m_opened)
>               {
>                       Mix_CloseAudio();
> -                     for (int i = m_samples.size(); i > 0; i--)//Optimized
> +                     for (int i = m_samples.size() - 1; i >= 0; i--) 
> //Optimized
>                       {
>                               if (m_samples[i])

What about:
        for ( size_t i = m_samples.size(); i > 0; --i)
        {
                <type> sample = m_samples[i-1];
                if ( sample )
                ...

I'd rather not cast from unsigned to signed..

--strk;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]