Commit Message
Hi!
Thanks, I will test this patch.
One note, there was a missing {
+ if (parsing) {
Attached a newer version of the patch.
Regards
Marco
Am 22.05.2011 13:43, schrieb Klaus Schmidinger:
> if (parsing)
Comments
On 22.05.2011 16:03, Marco Göbenich wrote:
> Hi!
>
> Thanks, I will test this patch.
>
> One note, there was a missing {
>
> + if (parsing) {
I just quickly hacked that one together, without actually testing it ;-)
Klaus
@@ -73,15 +73,18 @@
{
char *e = strchr(s, ']');
if (e) {
- numCodes = 0;
+ int NumCodes = 0;
char *t = s;
char *p = s;
while (t < e) {
- if (numCodes < MaxDiseqcCodes) {
+ if (NumCodes < MaxDiseqcCodes) {
errno = 0;
int n = strtol(t, &p, 16);
if (!errno && p != t && 0 <= n && n <= 255) {
- codes[numCodes++] = n;
+ if (parsing) {
+ codes[NumCodes++] = n;
+ numCodes = NumCodes;
+ }
t = skipspace(p);
}
else {