summaryrefslogtreecommitdiff
path: root/libsi/descriptor.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-03-13 11:07:02 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-03-13 11:07:02 +0100
commit6dd6aea940b839010a8ea1624afdcd3cda0415d9 (patch)
treeef1fe33af580fde5e80aae8e95d8b0161ba0732a /libsi/descriptor.c
parente4b414bae3de62b32c1b05ee90bd1d703a9628c7 (diff)
downloadvdr-6dd6aea940b839010a8ea1624afdcd3cda0415d9.tar.gz
vdr-6dd6aea940b839010a8ea1624afdcd3cda0415d9.tar.bz2
Some fixes to handling itemized texts
Diffstat (limited to 'libsi/descriptor.c')
-rw-r--r--libsi/descriptor.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libsi/descriptor.c b/libsi/descriptor.c
index d85a6a13..a9eaf044 100644
--- a/libsi/descriptor.c
+++ b/libsi/descriptor.c
@@ -6,7 +6,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: descriptor.c 1.8 2004/03/07 11:07:57 kls Exp $
+ * $Id: descriptor.c 1.9 2004/03/13 11:07:02 kls Exp $
* *
***************************************************************************/
@@ -83,7 +83,7 @@ int ExtendedEventDescriptors::getMaximumTextLength() {
}
char *ExtendedEventDescriptors::getText(const char *separation1, const char *separation2) {
- char *text=new char[getMaximumTextLength()];
+ char *text=new char[getMaximumTextLength()+strlen(separation1)+strlen(separation2)];
return getText(text, separation1, separation2);
}
@@ -148,7 +148,7 @@ int ExtendedEventDescriptors::getMaximumTextPlainLength() {
char *ExtendedEventDescriptors::getTextPlain() {
char *text=new char[getMaximumTextPlainLength()];
- return getText(text);
+ return getTextPlain(text);
}
char *ExtendedEventDescriptors::getTextPlain(char *buffer) {
@@ -182,8 +182,8 @@ int ExtendedEventDescriptors::getMaximumTextItemizedLength() {
}
char *ExtendedEventDescriptors::getTextItemized(const char *separation1, const char *separation2) {
- char *text=new char[getMaximumTextItemizedLength()];
- return getText(text, separation1, separation2);
+ char *text=new char[getMaximumTextItemizedLength()+strlen(separation1)+strlen(separation2)];
+ return getTextItemized(text, separation1, separation2);
}
char *ExtendedEventDescriptors::getTextItemized(char *buffer, const char *separation1, const char *separation2) {
@@ -243,6 +243,7 @@ bool ExtendedEventDescriptors::getTextItemized(Loop::Iterator &it, bool &valid,
item.item.getText(itemDescription);
item.itemDescription.getText(itemText);
valid=true;
+ break;
} else {
it.reset();
continue;