From: Ian Jackson Date: Thu, 3 Sep 2020 20:34:35 +0000 (+0100) Subject: before refactor report X-Git-Tag: otter-0.2.0~1026 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2ff9d5eb69f66a213596ecd8b82cdd9baa47bce4;p=otter.git before refactor report --- diff --git a/src/api.rs b/src/api.rs index 485a6c4a..e3088e25 100644 --- a/src/api.rs +++ b/src/api.rs @@ -249,7 +249,7 @@ impl ApiPieceOp for ApiPieceMove { -> (PieceUpdateOp<()>, Vec) { let pc = gs.pieces.byid_mut(piece).unwrap(); let (pos, clamped) = self.0.clamped(gs.table_size); - pc.pos = self.0; + pc.pos = pos; if clamped { Err(ApiPieceOpError::ReportViaUpdate(PieceOpError::PosOffTable))?; }