aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sword1/sound.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sword1/sound.cpp b/engines/sword1/sound.cpp
index 3e920c5018..b3fa1aa0fd 100644
--- a/engines/sword1/sound.cpp
+++ b/engines/sword1/sound.cpp
@@ -127,9 +127,9 @@ void Sound::checkSpeechFileEndianness() {
size /= 2;
int16 prev_be_value = (int16)SWAP_BYTES_16(*((uint16*)(data)));
for (uint32 i = 1 ; i < size ; ++i) {
- le_diff_sum += fabs(data[i] - data[i-1]);
+ le_diff_sum += fabs((double)(data[i] - data[i-1]));
int16 be_value = (int16)SWAP_BYTES_16(*((uint16*)(data + i)));
- be_diff_sum += fabs(be_value - prev_be_value);
+ be_diff_sum += fabs((double)(be_value - prev_be_value));
prev_be_value = be_value;
}
delete [] data;