aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-03-10 23:23:48 +0100
committerdec05eba <dec05eba@protonmail.com>2024-03-10 23:23:48 +0100
commit6361d998b835fe15a5235be7b69e705d8fbc4226 (patch)
tree0653572b46c59da5cf0433065b37bd3a4cf75159 /src
parent0d25ffb2a97ff7ff51fab72b6780024909f3e1a6 (diff)
bad size
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d6615f8..db43d70 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -872,12 +872,12 @@ static bool try_card_has_valid_plane(const char *card_path) {
/* output should be >= 128 bytes */
static bool gsr_get_valid_card_path(gsr_egl *egl, char *output) {
if(egl->dri_card_path) {
- strncpy(output, egl->dri_card_path, 128);
+ strncpy(output, egl->dri_card_path, 127);
return try_card_has_valid_plane(output);
}
for(int i = 0; i < 10; ++i) {
- snprintf(output, 128, DRM_DEV_NAME, DRM_DIR_NAME, i);
+ snprintf(output, 127, DRM_DEV_NAME, DRM_DIR_NAME, i);
if(try_card_has_valid_plane(output))
return true;
}