summaryrefslogtreecommitdiffstats
path: root/src/file.c
diff options
context:
space:
mode:
authorandmarti1424 <andmarti@gmail.com>2017-02-23 23:32:16 -0300
committerandmarti1424 <andmarti@gmail.com>2017-02-23 23:32:16 -0300
commitb988581496233e9f78b7bc5baad69cca76a981f7 (patch)
tree957b79133108efdd292c760513f61e70d4c8e692 /src/file.c
parenteebb12b780c3014f6c81384b8062934c9735006a (diff)
Fix in freeze branch when saving pads and locked cells
Diffstat (limited to 'src/file.c')
-rw-r--r--src/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/file.c b/src/file.c
index fcab79b..7ea923a 100644
--- a/src/file.c
+++ b/src/file.c
@@ -279,7 +279,7 @@ void write_fd(register FILE *f, int r0, int c0, int rn, int cn) {
int r_aux = r;
if ( (*pp)->pad && r <= maxrow && ( r == 0 || (*ATBL(tbl, r-1, c) == NULL) ||
(*ATBL(tbl, r-1, c) != NULL && ((*ATBL(tbl, r-1, c))->pad != (*pp)->pad)) )) {
- while (r_aux < maxrow && *ATBL(tbl, r_aux, c) != NULL && (*pp)->pad == (*ATBL(tbl, r_aux, c))->pad )
+ while (r_aux <= maxrow && *ATBL(tbl, r_aux, c) != NULL && (*pp)->pad == (*ATBL(tbl, r_aux, c))->pad )
r_aux++;
fprintf(f, "pad %d %s%d", (*pp)->pad, coltoa((*pp)->col), (*pp)->row);
if (r_aux-1 != (*pp)->row)
@@ -297,7 +297,7 @@ void write_fd(register FILE *f, int r0, int c0, int rn, int cn) {
// new implementation
int c_aux = c;
if ( (*pp)->flags & is_locked && c <= maxcol && ( c == 0 || ( *ATBL(tbl, r, c-1) != NULL && ! ((*ATBL(tbl, r, c-1))->flags & is_locked) ) )) {
- while (c_aux < maxcol && *ATBL(tbl, r, c_aux) != NULL && (*ATBL(tbl, r, c_aux))->flags & is_locked )
+ while (c_aux <= maxcol && *ATBL(tbl, r, c_aux) != NULL && (*ATBL(tbl, r, c_aux))->flags & is_locked )
c_aux++;
fprintf(f, "lock %s%d", coltoa((*pp)->col), (*pp)->row);
if (c_aux-1 != (*pp)->col)