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:
dbf7e8b
)
correct mirroring
author
Laurent Mazet
<mazet@softndesign.org>
Sun, 23 Jun 2024 08:15:13 +0000
(10:15 +0200)
committer
Laurent Mazet
<mazet@softndesign.org>
Sun, 23 Jun 2024 08:15:13 +0000
(10:15 +0200)
function.c
patch
|
blob
|
blame
|
history
diff --git
a/function.c
b/function.c
index 4cff58e8921f91b5848acd973234cfebbca19ae2..aa5a1e9e82a810f89502feda02faa70c003399f0 100644
(file)
--- a/
function.c
+++ b/
function.c
@@
-289,8
+289,8
@@
void mirrorelement (board_t *element, int mode)
}
}
if (mode < 0) { /* horizontaly */
- for (
i = 0; i < element->xsize / 2 ; i
++) {
- for (
j = 0; j < element->ysize; j
++) {
+ for (
j = 0; j < element->ysize; j
++) {
+ for (
i = 0; i < element->xsize / 2 ; i
++) {
char *pt1 = getcell (element, i, j);
char *pt2 = getcell (element, element->xsize - 1 - i, j);
char temp = *pt1;