Fix off by one in if condition

This commit is contained in:
Kovid Goyal 2026-05-11 22:06:32 +05:30
parent 02cfa89bae
commit f4e9824e18
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -1458,7 +1458,7 @@ parse_uri_list(Window *w, char *data, const ssize_t sz, size_t *num_uris_out) {
// First pass: count non-comment, non-empty lines
size_t count = 0;
char *p = data;
while (p - data <= sz) {
while (p - data < sz) {
char *eol = p + strcspn(p, "\r\n");
char saved = *eol; *eol = '\0';
char *end = eol;