diff --git a/backends/playback/zsm/zsm_backend.cpp b/backends/playback/zsm/zsm_backend.cpp index a1ab804..641dfd0 100644 --- a/backends/playback/zsm/zsm_backend.cpp +++ b/backends/playback/zsm/zsm_backend.cpp @@ -46,7 +46,7 @@ void ZsmBackend::load(const char *filename) { file->seek(pcm_offset, SeekType::SET); file->read(loop_point, 1, 1); pcm_offset++; - pcm_data_offs = (loop_point[0] * 16) + pcm_offset; + pcm_data_offs = (((uint16_t)loop_point[0]) + 1) * 16) + pcm_offset; file->seek(music_data_start, SeekType::SET); this->loop_point = std::max(this->loop_point, (uint32_t)music_data_start); double prev_time = 0.0;