channel: fix ch_number type, might fix crashes and numbers > 2000

This commit is contained in:
Jaroslav Kysela 2014-09-12 17:43:38 +02:00
parent 9a1fc691d5
commit ea9d782ba8
2 changed files with 5 additions and 5 deletions

View file

@ -47,10 +47,10 @@ typedef struct channel
int ch_zombie;
/* Channel info */
char *ch_name; // Note: do not access directly!
int ch_number;
char *ch_icon;
struct channel_tag_mapping_list ch_ctms;
char *ch_name; // Note: do not access directly!
int64_t ch_number;
char *ch_icon;
struct channel_tag_mapping_list ch_ctms;
/* Service/subscriptions */
LIST_HEAD(, channel_service_mapping) ch_services;

View file

@ -152,7 +152,7 @@ prop_write_values
char *s;
if (!(new = htsmsg_field_get_str(f)))
continue;
s64 = atol(new) * p->intsplit;
s64 = (int64_t)atol(new) * p->intsplit;
if ((s = strchr(new, '.')) != NULL)
s64 += (atol(s + 1) % p->intsplit);
} else {