Received: by mail.netbsd.org (Postfix, from userid 605) id C2EC684EA4; Sat, 21 May 2022 19:01:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 0038A84E90 for ; Sat, 21 May 2022 19:01:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id jv-_8CX1EtFi for ; Sat, 21 May 2022 19:01:32 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 8DEA384CFA for ; Sat, 21 May 2022 19:01:32 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 195CDFAEB; Sat, 21 May 2022 19:02:15 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 21 May 2022 19:02:15 +0000 From: "Roland Illig" Subject: CVS commit: src/games/gomoku To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20220521190215.195CDFAEB@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Roland Illig" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: rillig Date: Sat May 21 19:02:15 UTC 2022 Modified Files: src/games/gomoku: main.c stoc.c Log Message: gomoku: fix error handling when reading moves from a file The columns of the board are labeled from A to H and J to T, which makes I5 or i5 an invalid coordinate. Previously, reading this invalid coordinate from a file resulted in the string "<6" appearing in the move log. The 'i' was converted into the nonexistent column 20, and PT(20, 5) got an out-of-bounds argument, resulting in spot 120. Converting this spot back into coordinates resulted in PT(0, 6). The '<' comes from 'letters[0]'. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/games/gomoku/main.c cvs rdiff -u -r1.19 -r1.20 src/games/gomoku/stoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.