Fix Stack_Peek

This commit is contained in:
Alexander Zakharov 2017-03-13 15:45:27 +03:00
parent 9d4811ee0e
commit 3f139108ff

View File

@ -176,7 +176,7 @@ void* Stack_Peek(wStack* stack)
EnterCriticalSection(&stack->lock);
if (stack->size > 0)
obj = stack->array[stack->size];
obj = stack->array[stack->size - 1];
if (stack->synchronized)
LeaveCriticalSection(&stack->lock);