Soft'N'Design Software
/
projects
/
gameoflife.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e41f113
)
fix
author
Laurent Mazet
<mazet@softndesign.org>
Thu, 27 Jun 2024 21:12:45 +0000
(23:12 +0200)
committer
Laurent Mazet
<mazet@softndesign.org>
Thu, 27 Jun 2024 21:12:45 +0000
(23:12 +0200)
gameoflife.c
patch
|
blob
|
blame
|
history
diff --git
a/gameoflife.c
b/gameoflife.c
index c67d1eab2944c6d9ae22ae500b97fe8529899264..1946e0316d9ada229039724b6b1bdd306e032173 100644
(file)
--- a/
gameoflife.c
+++ b/
gameoflife.c
@@
-193,7
+193,7
@@
int main (int argc, char *argv[])
int yhelp = yboard;
int xelement = (xsize - element->xsize) / 2;
int yelement = (ysize - element->ysize) / 2;
- int xsave =
xboard + (board->xsize - savelen) / 2
;
+ int xsave =
max (xboard + (board->xsize - savelen) / 2, 1)
;
int ysave = yboard + (board->ysize - 1) / 2;
char *savename = NULL;