diff --git a/src/common/audio/sound/s_sound.cpp b/src/common/audio/sound/s_sound.cpp index 34ba9e2699..c5e2bc0726 100644 --- a/src/common/audio/sound/s_sound.cpp +++ b/src/common/audio/sound/s_sound.cpp @@ -554,8 +554,8 @@ FSoundChan *SoundEngine::StartSound(int type, const void *source, float sfxlength = (float)GSnd->GetMSLength(sfx->data) / 1000.f; startTime = (startflags & SNDF_LOOP) - ? (sfxlength > 0 ? fmod(startTime, sfxlength) : 0) - : clamp(startTime, 0.f, sfxlength); + ? (sfxlength > 0 ? fmodf(startTime, sfxlength) : 0.f) + : clamp(startTime, 0.f, sfxlength); if (attenuation > 0 && type != SOURCE_None) { diff --git a/src/scripting/vmthunks.cpp b/src/scripting/vmthunks.cpp index e913bec654..3d6b1f5001 100644 --- a/src/scripting/vmthunks.cpp +++ b/src/scripting/vmthunks.cpp @@ -2675,7 +2675,7 @@ static int GetEpochTime() { time_t now; time(&now); - return now != (time_t)(-1) ? now + epochoffset : (time_t)(-1); + return now != (time_t)(-1) ? int(now + epochoffset) : -1; } //Returns an empty string if the Strf tokens are valid, otherwise returns the problematic token