summaryrefslogtreecommitdiff
path: root/epgsearchext.c
diff options
context:
space:
mode:
Diffstat (limited to 'epgsearchext.c')
-rw-r--r--epgsearchext.c6
1 files changed, 6 insertions, 0 deletions
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)
{