Fix for compilers that don't like non-constant format strings

This commit is contained in:
Klaus Schmidinger 2024-09-09 13:39:05 +02:00
parent 0c91893643
commit c0a005b3cd
3 changed files with 9 additions and 4 deletions

View File

@ -3351,6 +3351,7 @@ Mike Hay <mike.hay@linenshorts.com>
Stefan Hofmann <stefan.hofmann@t-online.de>
for suggesting to implement support for remote controls that only have a combined
"Play/Pause" key instead of separate keys for "Play" and "Pause"
for a fix for compilers that don't like non-constant format strings
Stefan Blochberger <Stefan.Blochberger@gmx.de>
for suggesting to automatically display the progress display whenever replay of a

View File

@ -9983,3 +9983,7 @@ Video Disk Recorder Revision History
- There will be no more distinction between "developer" and "stable" versions regarding
version numbering. Version numbers are simply counted upwards, with each of the three
parts ("version", "major", "minor") always being a single digit, and '0' being skipped.
2024-09-09:
- Fix for compilers that don't like non-constant format strings (thanks to Stefan Hofmann).

View File

@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
* $Id: svdrp.c 5.9 2024/08/30 09:55:15 kls Exp $
* $Id: svdrp.c 5.10 2024/09/09 13:39:05 kls Exp $
*/
#include "svdrp.h"
@ -1246,7 +1246,7 @@ void cSVDRPServer::CmdAUDI(const char *Option)
const tTrackId *TrackId = cDevice::PrimaryDevice()->GetTrack(eTrackType(o));
if (TrackId && TrackId->id) {
cDevice::PrimaryDevice()->SetCurrentAudioTrack(eTrackType(o));
Reply(250, cString::sprintf("%d %s %s", eTrackType(o), *TrackId->language ? TrackId->language : "---", *TrackId->description ? TrackId->description : "-"));
Reply(250, "%d %s %s", eTrackType(o), *TrackId->language ? TrackId->language : "---", *TrackId->description ? TrackId->description : "-");
}
else
Reply(501, "Audio track \"%s\" not available", Option);
@ -1265,12 +1265,12 @@ void cSVDRPServer::CmdAUDI(const char *Option)
const tTrackId *TrackId = cDevice::PrimaryDevice()->GetTrack(eTrackType(i));
if (TrackId && TrackId->id) {
if (*s)
Reply(-250, s);
Reply(-250, "%s", *s);
s = cString::sprintf("%d %s %s%s", eTrackType(i), *TrackId->language ? TrackId->language : "---", i == CurrentAudioTrack ? "*" : "", *TrackId->description ? TrackId->description : "-");
}
}
if (*s)
Reply(250, s);
Reply(250, "%s", *s);
else
Reply(550, "No audio tracks available");
}