diff options
| author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-07-26 12:31:14 +0200 | 
|---|---|---|
| committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-07-26 12:31:14 +0200 | 
| commit | 35549dbd8b5ee97424a211411ed1a3af4f95e742 (patch) | |
| tree | d2b516073b02d8c357345020c1865ea6ec5f829c | |
| parent | 9eb6907963360f65ba2d538add0a03d0fd181991 (diff) | |
| download | uca-35549dbd8b5ee97424a211411ed1a3af4f95e742.tar.gz uca-35549dbd8b5ee97424a211411ed1a3af4f95e742.tar.bz2 uca-35549dbd8b5ee97424a211411ed1a3af4f95e742.tar.xz uca-35549dbd8b5ee97424a211411ed1a3af4f95e742.zip | |
Fix SIGFPE
| -rw-r--r-- | bin/gui/control.c | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/bin/gui/control.c b/bin/gui/control.c index b8023f7..8b51cc6 100644 --- a/bin/gui/control.c +++ b/bin/gui/control.c @@ -413,7 +413,8 @@ update_current_frame (ThreadData *data)      n_max = ring_buffer_get_num_blocks (data->buffer);      /* Shift index so that we always show the oldest frames first */ -    index = (index + data->n_recorded - n_max) % n_max; +    if (n_max > 0) +        index = (index + data->n_recorded - n_max) % n_max;      ring_buffer_set_current_pointer (data->buffer, index); | 
