links

lynx-like text mode web browser
git clone anongit@rnpnr.xyz:links.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 4f06423c561fd30837fa962a2f0a4955a7b07209
Parent: 77bdbd73bf3a82d12318ce6ea16693dee26cb101
Author: opask
Date:   Wed, 15 Aug 2018 06:21:39 -0600

replace MAX_SIZE_T with its value

Diffstat:
Mhtml_r.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/html_r.c b/html_r.c @@ -1506,7 +1506,7 @@ int get_search_data(struct f_data *f) { if (f->search_pos) return 0; if (get_srch(f)) return -1; - if ((size_t)n_chr > MAX_SIZE_T / sizeof(char_t) || (size_t)n_pos > MAX_SIZE_T / sizeof(struct search)) return -1; + if ((size_t)n_chr > ((size_t) - 1) / sizeof(char_t) || (size_t)n_pos > ((size_t) - 1) / sizeof(struct search)) return -1; f->search_chr = xmalloc(n_chr * sizeof(char_t)); if (!f->search_chr) return -1; f->search_pos = xmalloc(n_pos * sizeof(struct search));