aboutsummaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 7ee275a..1515a7d 100644
--- a/misc.c
+++ b/misc.c
@@ -56,7 +56,7 @@ double get_sec()
*/
int construct_out_name(char *buffer, size_t buffer_size, char* format, unsigned int track)
{
- if (snprintf(buffer, buffer_size, format, track) == buffer_size)
+ if (snprintf(buffer, buffer_size, format, track) >= buffer_size - 1)
{
fprintf(stderr, "Filename too large for buffer (max %zd)\n", buffer_size);
return -1;