Commit 16b2d01f authored by Andrew Price's avatar Andrew Price
Browse files

Fix an infinite loop in .replay since

Loops work better when the loop variable changes.
parent 731635f8
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -144,8 +144,8 @@ void replay(ipc_connection_t *conn, ipc_message_t *msg)
			if (store[oldest]!=NULL &&
				store[oldest]->head.when >= want) break;
			skip++;
			oldest = store_wrap(oldest + 1);
		}
		oldest = store_wrap( oldest + skip );
		len -= skip;
		/* if it fails you get nothing as there is
		 * nothing newer (larger) than the date you gave */