summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-07-24 06:49:39 +0200
committerkdx <kikoodx@paranoici.org>2023-07-24 06:49:39 +0200
commit0eb8f630dfc94b3fa562fd1e2a98231d2d83f6f8 (patch)
treee6508bea2b53b945004a2e242f3d0a456e13287b
parent2fc7013751708afbf668a61b7e492d9e58057652 (diff)
downloadegecs-0eb8f630dfc94b3fa562fd1e2a98231d2d83f6f8.tar.gz
fix babye bug
-rw-r--r--egecs.golem4
1 files changed, 2 insertions, 2 deletions
diff --git a/egecs.golem b/egecs.golem
index 3dcc3de..4bc775c 100644
--- a/egecs.golem
+++ b/egecs.golem
@@ -33,7 +33,7 @@ egecs_cycle() {
board_display(from);
col_green();
to = geadline("> ");
- if ((board_get(to) != INVALID) & (white(board_get(to)) == 0))
+ if ((to != NULL) & (board_get(to) != INVALID) & (white(board_get(to)) == 0))
break;
if (to) {
free(to);
@@ -61,7 +61,7 @@ egecs_cycle() {
board_display(from);
col_red();
to = geadline("> ");
- if ((board_get(to) != INVALID) & (black(board_get(to)) == 0))
+ if ((to != NULL) & (board_get(to) != INVALID) & (black(board_get(to)) == 0))
break;
if (to) {
free(to);