Skip to content

Commit 663f5d8

Browse files
committed
vdisp/gl: fix wrong pointer passed with help
Fixes the commit 9c597ae (yesterday) - after the move, the ptr must have been replaced for tok, otherwise passing 2 or more options to gl, like `-d gl:fs:cursor`, causes segfault.
1 parent c54e9d4 commit 663f5d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/video_display/gl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ static void *display_gl_parse_fmt(struct state_gl *s, char *ptr) {
713713
char *tok, *save_ptr = NULL;
714714

715715
while((tok = strtok_r(ptr, ":", &save_ptr)) != NULL) {
716-
if (strcmp(ptr, "help") == 0 || strcmp(ptr, "fullhelp") == 0) {
716+
if (strcmp(tok, "help") == 0 || strcmp(tok, "fullhelp") == 0) {
717717
gl_show_help(strcmp(ptr, "fullhelp") == 0);
718718
return INIT_NOERR;
719719
}

0 commit comments

Comments
 (0)