]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - util.c
actually no :)
[xonotic/gmqcc.git] / util.c
diff --git a/util.c b/util.c
index b34460d97b63dd983d5e8e5b00161a31512583ec..3cdc1dbed6e875b8af1e715a652994ba6805e4c6 100644 (file)
--- a/util.c
+++ b/util.c
@@ -425,7 +425,7 @@ static GMQCC_INLINE void mt_generate(void) {
      * Said loop has been unrolled for MT_SPACE (226 iterations), opposed
      * to [0, MT_SIZE)  (634 iterations).
      */
-    for (i = 0; i < MT_SPACE; ++i) {
+    for (i = 0; i < MT_SPACE-1; ++i) {
         y           = (0x80000000 & mt_state[i]) | (0x7FFFFFF & mt_state[i + 1]);
         mt_state[i] = mt_state[i + MT_PERIOD] ^ (y >> 1) ^ matrix[y & 1];
 
@@ -440,7 +440,7 @@ static GMQCC_INLINE void mt_generate(void) {
      * = 2*2*3*3*11])
      */
     i = MT_SPACE;
-    while (i < MT_SIZE - 1) {
+    while (i < MT_SIZE-2) {
         /*
          * We expand this 11 times .. manually, no macros are required
          * here. This all fits in the CPU cache.