diff options
-rw-r--r-- | src/whirligig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/whirligig.c b/src/whirligig.c index ea78edb8..2d36839b 100644 --- a/src/whirligig.c +++ b/src/whirligig.c @@ -311,7 +311,7 @@ int main(int argc, char *argv[]) pos--; } - if ( (ser[pos] == -1) && (ser[pos-1] == -1) ) { + if ( (pos > 0) && (ser[pos] == -1) && (ser[pos-1] == -1) ) { /* Series ready to process */ process_series(win, ser, mat, pos-2); dump(win, ser, mat, window_len, pos); |