# HG changeset patch # User Balazs Dezso # Date 2008-01-25 15:23:28 # Node ID 4790635473efccc789392ad2f2728a843189ef79 # Parent 6ec5dbed8f1896434ffca37a48bd75d60ca0505d Array range check warning workaround in random.h The g++-4.2.1 preferred by OpenSUSE has a bug with array range cheking diff --git a/lemon/random.h b/lemon/random.h --- a/lemon/random.h +++ b/lemon/random.h @@ -254,7 +254,7 @@ curr[length - shift] ^ mask[curr[-1] & 1ul]; --curr; } - curr[0] = (((curr[0] & hiMask) | (curr[length - 1] & loMask)) >> 1) ^ + state[0] = (((state[0] & hiMask) | (curr[length - 1] & loMask)) >> 1) ^ curr[length - shift] ^ mask[curr[length - 1] & 1ul]; }