• Sam Lantinga's avatar
    Fixed bug #570 · be2cfc6a
    Sam Lantinga authored
    SDL_SemWaitTimeout in src/thread/generic/SDL_syssem.c line 179 (SVN trunk):
    
    --sem->count;
    
    should be
    
    if (retval == 0) {
        --sem->count;
    }
    
    Without this, sem->count will underflow on timeout effectively breaking the
    semaphore. It appears that the implementation has been wrong since the initial
    revision.
    
    --HG--
    extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403844
    be2cfc6a
SDL_syssem.c 4.58 KB