This commit is contained in:
Kovid Goyal 2022-12-03 12:25:23 +05:30
parent 6422b323c6
commit 76f6288e69
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

2
glfw/x11_window.c vendored
View File

@ -2861,7 +2861,7 @@ static MimeAtom atom_for_mime(const char *mime) {
MimeAtom ma = {.mime=_glfw_strdup(mime), .atom=XInternAtom(_glfw.x11.display, mime, 0)}; MimeAtom ma = {.mime=_glfw_strdup(mime), .atom=XInternAtom(_glfw.x11.display, mime, 0)};
if (_glfw.x11.mime_atoms.capacity < _glfw.x11.mime_atoms.sz + 1) { if (_glfw.x11.mime_atoms.capacity < _glfw.x11.mime_atoms.sz + 1) {
_glfw.x11.mime_atoms.capacity += 32; _glfw.x11.mime_atoms.capacity += 32;
_glfw.x11.mime_atoms.array = realloc(_glfw.x11.mime_atoms.array, _glfw.x11.mime_atoms.capacity); _glfw.x11.mime_atoms.array = realloc(_glfw.x11.mime_atoms.array, _glfw.x11.mime_atoms.capacity * sizeof(_glfw.x11.mime_atoms.array[0]));
} }
_glfw.x11.mime_atoms.array[_glfw.x11.mime_atoms.sz++] = ma; _glfw.x11.mime_atoms.array[_glfw.x11.mime_atoms.sz++] = ma;
return ma; return ma;