diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-01-26 16:28:35 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-01-26 16:28:35 +0100 |
commit | 1884b72ff3351dd1ce6d07f35af127507fd6a675 (patch) | |
tree | 5739a9f380a6f9396bcc16256fb9e1e1eb192deb /channels.c | |
parent | 76866e7019e5edd90a8caaa59f563e747b833627 (diff) | |
download | vdr-1884b72ff3351dd1ce6d07f35af127507fd6a675.tar.gz vdr-1884b72ff3351dd1ce6d07f35af127507fd6a675.tar.bz2 |
Fixed handling CA ids (was broken in 1.3.4)
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 1.21 2004/01/25 16:02:13 kls Exp $ + * $Id: channels.c 1.22 2004/01/26 16:28:35 kls Exp $ */ #include "channels.h" @@ -322,6 +322,8 @@ static int IntArrayToString(char *s, const int *a, int Base = 10, const char n[] q += sprintf(q, Base == 16 ? "%s%X" : "%s%d", i ? "," : "", a[i]); if (a[i] && n && *n[i]) q += sprintf(q, "=%s", n[i]); + if (!a[i]) + break; i++; } *q = 0; @@ -375,8 +377,11 @@ void cChannel::SetCaIds(const int *CaIds) IntArrayToString(OldCaIdsBuf, caids, 16); IntArrayToString(NewCaIdsBuf, CaIds, 16); dsyslog("changing caids of channel %d from %s to %s", Number(), OldCaIdsBuf, NewCaIdsBuf); - for (int i = 0; i <= MAXCAIDS && CaIds[i]; i++) // <= to copy the terminating 0 + for (int i = 0; i <= MAXCAIDS; i++) { // <= to copy the terminating 0 caids[i] = CaIds[i]; + if (!CaIds[i]) + break; + } modification |= CHANNELMOD_CA; Channels.SetModified(); } |