From 0380b95492b75191ac024e2a20042a5428a32ccd Mon Sep 17 00:00:00 2001 From: irei1as Date: Sun, 11 Mar 2018 17:20:59 +0100 Subject: [PATCH] Update sfxSound.cpp --- Engine/source/sfx/sfxSound.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Engine/source/sfx/sfxSound.cpp b/Engine/source/sfx/sfxSound.cpp index 683f70cda..df856ae8f 100644 --- a/Engine/source/sfx/sfxSound.cpp +++ b/Engine/source/sfx/sfxSound.cpp @@ -693,8 +693,9 @@ DefineEngineMethod( SFXSound, setPosition, void, ( F32 position ),, "playback will resume at the given position when play() is called.\n\n" "@param position The new position of the play cursor (in seconds).\n" ) { - if( position >= 0 && position <= object->getDuration() ) - object->setPosition( position * 1000.0f ); + position *= 1000.0f; + if( position >= 0 && position < object->getDuration() ) + object->setPosition( position ); } //-----------------------------------------------------------------------------