mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
c/main: fix snprintf output truncation
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2140>
This commit is contained in:
parent
393a08600e
commit
fa81698f01
|
@ -1101,7 +1101,7 @@ comp_main_create_system_compositor(struct xrt_device *xdev,
|
||||||
|
|
||||||
// Only add active views.
|
// Only add active views.
|
||||||
for (uint32_t i = 0; i < view_count; i++) {
|
for (uint32_t i = 0; i < view_count; i++) {
|
||||||
char tmp[] = "View[X_XXX_XXX]";
|
char tmp[64] = {0};
|
||||||
snprintf(tmp, sizeof(tmp), "View[%u]", i);
|
snprintf(tmp, sizeof(tmp), "View[%u]", i);
|
||||||
u_var_add_native_images_debug(c, &c->scratch.views[i].unid, tmp);
|
u_var_add_native_images_debug(c, &c->scratch.views[i].unid, tmp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue