rem: try { for (var i = 1;i<8;i++) { tmp = pos[to[0]+i][to[1]+i] if (tmp && "queen" == tmp.piece && tmp.color == color) { rtrns[rtrns.length] = new Array(to[0]+i, to[1]+i) break 
add: if (controlNo > rtrns.length) { try { for (var i = 1;i<8;i++) { tmp = pos[to[0]+i][to[1]+i] if (tmp && "queen" == tmp.piece && tmp.color == color) { rtrns[rtrns.length] = new Array(to[0]+i, to[1]+i) break } else if (tmp.piece) break 
context: 	function findFromQueen(pos, toSAN, to, color) {		var op = getOppColor(color)		var extra = to[2]		var rtrns = new Array()							var tmp		try {			for (var i = 1;i<8;i++) {				 tmp = pos[to[0]+i][to[1]]				 if (tmp && "queen" == tmp.piece && tmp.color == color) {						rtrns[rtrns.length] = new Array(to[0]+i, to[1])						break				 }				 else if (tmp.piece)						break			}		}		catch (e) {}				try {			for (var i = 1;i<8;i++) {				 tmp = pos[to[0]][to[1]+i]				 if (tmp && "queen" == tmp.piece && tmp.color == color) {						rtrns[rtrns.length] = new Array(to[0], to[1]+i)						break				 }				 else if (tmp.piece)						break			}		}		catch (e) {}		try {			for (var i = 1;i<8;i++) {				 tmp = pos[to[0]-i][to[1]]				 if (tmp && "queen" == tmp.piece && tmp.color == color) {						rtrns[rtrns.length] = new Array(to[0]-i, to[1])						break				 }				 else if (tmp.piece)						break			}		}		catch (e) {}							try {			for (var i = 1;i<8;i++) {				tmp = pos[to[0]][to[1]-i]				if (tmp && "queen" == tmp.piece && tmp.color == color) {						rtrns[rtrns.length] = new Array(to[0], to[1]-i)						break				}				else if (tmp.piece)					break			}		}		catch (e) {}							try {			for (var i = 1;i<8;i++) {				tmp = pos[to[0]-i][to[1]-i]				if (tmp && "queen" == tmp.piece && tmp.color == color) {					rtrns[rtrns.length] = new Array(to[0]-i, to[1]-i)					break				}				else if (tmp.piece)					break			}		}		catch (e) {}			 		try {			for (var i = 1;i<8;i++) {				tmp = pos[to[0]+i][to[1]+i]				if (tmp && "queen" == tmp.piece && tmp.color == color) {					rtrns[rtrns.length] = new Array(to[0]+i, to[1]+i)					break				}				else if (tmp.piece)					break			}		}		catch (e) {}							try {			for (var i = 1;i<8;i++) {				tmp = pos[to[0]-i][to[1]+i]				if (tmp && "queen" == tmp.piece && tmp.color == color) {					rtrns[rtrns.length] = new Array(to[0]-i, to[1]+i)					break				}				else if (tmp.piece)					break			}		}		catch (e) {}							try {			for (var i = 1;i<8;i++) {				tmp = pos[to[0]+i][to[1]-i]				if (tmp && "queen" == tmp.piece && tmp.color == color) {					rtrns[rtrns.length] = new Array(to[0]+i, to[1]-i)					break				}				else if (tmp.piece)					break			}		}		catch (e) {}		// only one option		if (rtrns.length == 1)			return rtrns[0]		if (extra[0] != -1 || extra[1] != -1) {			// more than one queen can move there			// use the extra informatin (eg b from Qbd7			for (var i = 0;i < rtrns.length;i++) {				if (extra[0] != -1 && extra[0] == rtrns[i][1])					return rtrns[i]				else if (extra[1] != -1 && extra[1] == rtrns[i][0])					return rtrns[i]			}		}		throw("No queen move found '"+toSAN+"'")	}
meta: 5532	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5532/8dc82f970441289f8c19dae01ddbeadc156f15d6/converter.js/buggy/src/converter.js