Fix build on older compiler

This commit is contained in:
Kovid Goyal 2024-12-15 09:23:29 +05:30
parent 79a07ee61c
commit 678f2ad073
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View file

@ -84,7 +84,7 @@ consumption to do the same tasks.
Detailed list of changes
-------------------------------------
0.38.0 [future]
0.38.0 [2024-12-15]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Allow :ref:`specifying individual color themes <auto_color_scheme>` to use so that kitty changes colors automatically following the OS dark/light mode

View file

@ -297,7 +297,7 @@ on_key_input(const GLFWkeyevent *ev) {
}
if (w->buffered_keys.enabled) {
if (w->buffered_keys.capacity < w->buffered_keys.count + 1) {
w->buffered_keys.capacity = MAX(16, w->buffered_keys.capacity + 8);
w->buffered_keys.capacity = MAX(16u, w->buffered_keys.capacity + 8);
GLFWkeyevent *new = malloc(w->buffered_keys.capacity * sizeof(GLFWkeyevent));
if (!new) fatal("Out of memory");
memcpy(new, w->buffered_keys.key_data, w->buffered_keys.count * sizeof(new[0]));