Commit: 00878656c37ccbfaeb8aa306e9f844c7b6cd8dda
Parent: 490746c9481cac3bea727a04c4b39ade7ec6d4f6
Author: opask
Date: Sun, 12 Aug 2018 22:01:54 -0600
fix mistake causing seg fault when compiled with gcc or clang
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/links.h b/links.h
@@ -1426,7 +1426,7 @@ struct links_event {
int ev;
int x;
int y;
- int b;
+ long b;
};
#define EV_INIT 0
diff --git a/terminal.c b/terminal.c
@@ -837,7 +837,7 @@ static void in_term(void *term_)
term->cwd[MAX_CWD_LEN - 1] = 0;
term->environment = *(int *)(iq + sizeof(struct links_event) + MAX_TERM_LEN + MAX_CWD_LEN);
term->default_character_set = *(int *)(iq + sizeof(struct links_event) + MAX_TERM_LEN + MAX_CWD_LEN + sizeof(int));
- ev->b = (int)(long)(iq + sizeof(struct links_event) + MAX_TERM_LEN + MAX_CWD_LEN + 2 * sizeof(int));
+ ev->b = (long)(iq + sizeof(struct links_event) + MAX_TERM_LEN + MAX_CWD_LEN + 2 * sizeof(int));
r = (int)sizeof(struct links_event) + MAX_TERM_LEN + MAX_CWD_LEN + 3 * (int)sizeof(int) + init_len;
sync_term_specs();
}