1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-03 17:59:28 +02:00

Gesturestart had an off by one error in the control sequence.

This commit is contained in:
Simo Kinnunen 2014-09-16 10:51:46 +09:00
parent 85427fc50a
commit 68e8f1eb2f
2 changed files with 30 additions and 28 deletions

View file

@ -9,7 +9,9 @@ function SeqQueue(size, maxWaiting) {
SeqQueue.prototype.start = function(seq) {
this.locked = false
this.lo = seq
// The loop in maybeConsume() will make sure that the value wraps correctly
// if necessary.
this.lo = seq + 1
this.maybeConsume()
}
@ -35,7 +37,7 @@ SeqQueue.prototype.maybeConsume = function() {
while (this.waiting) {
// Did we reach the end of the loop? If so, start from the beginning.
if (this.lo === this.size) {
if (this.lo >= this.size) {
this.lo = 0
}