From ea9d782ba8759642161d1cbe13de35bb1c1a17cc Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 12 Sep 2014 17:43:38 +0200 Subject: [PATCH] channel: fix ch_number type, might fix crashes and numbers > 2000 --- src/channels.h | 8 ++++---- src/prop.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/channels.h b/src/channels.h index d75cc9ef..32742d33 100644 --- a/src/channels.h +++ b/src/channels.h @@ -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; diff --git a/src/prop.c b/src/prop.c index a2962ce3..f73a4568 100644 --- a/src/prop.c +++ b/src/prop.c @@ -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 {