mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-20 12:19:36 +00:00
Make UBSan happy
This commit is contained in:
parent
b54bfbb4f8
commit
35f88faeea
1 changed files with 1 additions and 0 deletions
|
|
@ -44,6 +44,7 @@ static void drop_pop_request(Window *w);
|
|||
|
||||
static size_t
|
||||
count_occurrences(const char *str, size_t len, char target) {
|
||||
if (!str) return 0;
|
||||
size_t count = 0;
|
||||
const char *ptr = str;
|
||||
while ((ptr = memchr(ptr, target, len - (ptr - str))) != NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue