From ce3f1cc0ef9f46d70ab5387b1458e9098b40711d Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 22 Mar 2025 06:43:11 +0100 Subject: Some safety with move arrays, small refactor appendchar --- test/080_allowednext/allowednext_tests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/080_allowednext/allowednext_tests.c') diff --git a/test/080_allowednext/allowednext_tests.c b/test/080_allowednext/allowednext_tests.c index 644d4c5..08fe491 100644 --- a/test/080_allowednext/allowednext_tests.c +++ b/test/080_allowednext/allowednext_tests.c @@ -1,6 +1,6 @@ #include "../test.h" -bool allowednextmove(uint8_t *, uint8_t); +bool allowednextmove(size_t n, const uint8_t [n]); static char *moves[] = { "U", "U2", "U'", @@ -31,5 +31,5 @@ void run(void) { n > 2 ? moves[m[n-3]] : "-", n > 1 ? moves[m[n-2]] : "-", n > 0 ? moves[m[n-1]] : "-"); - printf("%s\n", allowednextmove(m, n) ? "true" : "false"); + printf("%s\n", allowednextmove(n, m) ? "true" : "false"); } -- cgit v1.3