Skip to content

Commit

Permalink
dialog: Allocate space for terminator when building filter string
Browse files Browse the repository at this point in the history
  • Loading branch information
devon-artmeier authored and slouken committed Apr 16, 2024
1 parent fdcc3e1 commit 65a04a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dialog/SDL_dialog_utils.c
Expand Up @@ -54,7 +54,7 @@ char *convert_filters(const SDL_DialogFileFilter *filters, NameTransform ntf,

terminator = f[1].name ? separator : suffix;
new_length = SDL_strlen(combined) + SDL_strlen(converted)
+ SDL_strlen(terminator);
+ SDL_strlen(terminator) + 1;

new_combined = SDL_realloc(combined, new_length);

Expand Down

0 comments on commit 65a04a7

Please sign in to comment.