avoid negative values for the rotation variable

This commit is contained in:
owein D 2020-09-30 10:19:10 +02:00 committed by yvain douard
commit 0dcac31b4a

6
bfg.c
View file

@ -221,12 +221,6 @@ char *bf_next() {
} }
//we revert the ordering of the bruteforce to fix the first static character //we revert the ordering of the bruteforce to fix the first static character
if(rainy)
while (pos >= 0 && (++bf_options.state[bf_options.current-1-pos]) >= bf_options.crs_len) {
bf_options.state[bf_options.current-1-pos] = 0;
pos--;
}
else
while (pos >= 0 && (++bf_options.state[pos]) >= bf_options.crs_len) { while (pos >= 0 && (++bf_options.state[pos]) >= bf_options.crs_len) {
bf_options.state[pos] = 0; bf_options.state[pos] = 0;
pos--; pos--;