From 3d6c73c33276ecedba86cb871b4b5a089571629b Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 18 Oct 2024 12:21:51 +0200 Subject: New interface function nissy_countmoves --- src/core/moves.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/moves.h') diff --git a/src/core/moves.h b/src/core/moves.h index d07bc19..e3a9bc1 100644 --- a/src/core/moves.h +++ b/src/core/moves.h @@ -223,8 +223,9 @@ readmoves(const char *buf, int max, uint8_t *ret) uint8_t m; int c; - FOREACH_READMOVE(buf, m, c, max, -1, - ret[c] = m; + FOREACH_READMOVE(buf, m, c, max, NISSY_ERROR_INVALID_MOVES, + if (ret != NULL) + ret[c] = m; ) return c; -- cgit v1.3