diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-02-12 10:16:48 +0100 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-02-12 10:16:48 +0100 |
commit | 9c767e7ef973e6f75818f80b8e42f96ce13c4979 (patch) | |
tree | 18d448825d27e33e5588a12f206b10c2d557541b /src/main.c | |
parent | b27163360b463f16715f9fd72ca8817fad3d2d46 (diff) | |
download | pianobar-windows-9c767e7ef973e6f75818f80b8e42f96ce13c4979.tar.gz pianobar-windows-9c767e7ef973e6f75818f80b8e42f96ce13c4979.tar.bz2 pianobar-windows-9c767e7ef973e6f75818f80b8e42f96ce13c4979.zip |
(Hopfully) fix FPE -- again
Commit fcb1d460d459242dc30d033305db2cb9bf313f5e did only half of the
work. Commit a2aee035072a5d346c187a890539f72c6d5167a0 introduced another
division by zero.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -126,7 +126,8 @@ int main (int argc, char **argv) { scrobbleSong.length = player.songDuration / BAR_PLAYER_MS_TO_S_FACTOR; /* scrobble when >= nn% are played; use seconds, not * milliseconds */ - if (player.songPlayed / BAR_PLAYER_MS_TO_S_FACTOR * 100 / + if (scrobbleSong.length > 0 && + player.songPlayed / BAR_PLAYER_MS_TO_S_FACTOR * 100 / scrobbleSong.length >= settings.lastfmScrobblePercent && settings.enableScrobbling) { WardrobeReturn_t wRet; |