From c70415340f58c46e0565acab42ca4ff158a19b8d Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Thu, 25 Nov 2010 21:14:28 +0100 Subject: another FreeBSD patch concerning scanf --- epgsearchext.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'epgsearchext.c') diff --git a/epgsearchext.c b/epgsearchext.c index 3fd576e..fc76534 100644 --- a/epgsearchext.c +++ b/epgsearchext.c @@ -464,9 +464,15 @@ bool cSearchExt::Parse(const char *s) int fields = sscanf(value, "%d-%d", &minNum, &maxNum); if (fields == 0) // stored with ID { +#ifdef __FreeBSD__ + char *channelMinbuffer = MALLOC(char, 32); + char *channelMaxbuffer = MALLOC(char, 32); + int channels = sscanf(value, "%31[^|]|%31[^|]", channelMinbuffer, channelMaxbuffer); +#else char *channelMinbuffer = NULL; char *channelMaxbuffer = NULL; int channels = sscanf(value, "%a[^|]|%a[^|]", &channelMinbuffer, &channelMaxbuffer); +#endif channelMin = Channels.GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true); if (!channelMin) { -- cgit v1.2.3