Skip to content

Commit

Permalink
audacious.cc: print_audacious_filename(): fix always empty $audacious…
Browse files Browse the repository at this point in the history
…_filename

print_audacious_filename() always returns an empty (zero-length) $audacious_filename, due to one of the std::min() operators always being 0. Removing the std::min() construct fixes the problem. Fixes #1175.
  • Loading branch information
z1atk0 authored Sep 20, 2024
1 parent b64b801 commit 1a3a05b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audacious.cc
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void print_audacious_title(struct text_object *obj, char *p,

void print_audacious_filename(struct text_object *obj, char *p,
unsigned int p_max_size) {
snprintf(p, std::min((unsigned int)obj->data.i, p_max_size), "%s",
snprintf(p, p_max_size, "%s",
get_res().filename.c_str());
}

Expand Down

0 comments on commit 1a3a05b

Please sign in to comment.