mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 05:35:47 +01:00
fix incorrect use of sizeof() in snprintf (function never actually used in ardour,but ... )
This commit is contained in:
parent
3e661d97b5
commit
7aa46da32f
2 changed files with 3 additions and 3 deletions
|
|
@ -504,7 +504,7 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
|
|||
void timecode_time_subframes (framepos_t when, Timecode::Time&);
|
||||
|
||||
void timecode_duration (framecnt_t, Timecode::Time&) const;
|
||||
void timecode_duration_string (char *, framecnt_t) const;
|
||||
void timecode_duration_string (char *, size_t len, framecnt_t) const;
|
||||
|
||||
framecnt_t convert_to_frames (AnyTime const & position);
|
||||
framecnt_t any_duration_to_frames (framepos_t position, AnyTime const & duration);
|
||||
|
|
|
|||
|
|
@ -164,12 +164,12 @@ Session::timecode_duration (framecnt_t when, Timecode::Time& timecode) const
|
|||
}
|
||||
|
||||
void
|
||||
Session::timecode_duration_string (char* buf, framepos_t when) const
|
||||
Session::timecode_duration_string (char* buf, size_t len, framepos_t when) const
|
||||
{
|
||||
Timecode::Time timecode;
|
||||
|
||||
timecode_duration (when, timecode);
|
||||
snprintf (buf, sizeof (buf), "%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32, timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
|
||||
snprintf (buf, len, "%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32, timecode.hours, timecode.minutes, timecode.seconds, timecode.frames);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue