This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: ir-ctl: deal with consecutive pulses or spaces correctly
Author:  Sean Young <s...@mess.org>
Date:    Mon Sep 19 19:21:25 2016 -0300

When sending a pulse-space file with consecutive spaces or pulses, add them
together correctly. For example:

pulse 100
space 150
space 100
pulse 150
pulse 200

Would send pulse 100, space 250, and pulse 350.

Signed-off-by: Sean Young <s...@mess.org>

 utils/ir-ctl/ir-ctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=f2333b071135e96d550f89eb27149e9c18d0fe19
diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c
index 05b46a32ed6d..6b9ea491e0b4 100644
--- a/utils/ir-ctl/ir-ctl.c
+++ b/utils/ir-ctl/ir-ctl.c
@@ -211,7 +211,7 @@ static struct file *read_file(const char *fname)
                                        fprintf(stderr, _("warning: %s:%d: 
leading space ignored\n"),
                                                fname, lineno);
                                } else {
-                                       f->buf[len] += arg;
+                                       f->buf[len-1] += arg;
                                }
                        } else {
                                f->buf[len++] = arg;
@@ -220,7 +220,7 @@ static struct file *read_file(const char *fname)
                        expect_pulse = true;
                } else if (strcmp(keyword, "pulse") == 0) {
                        if (!expect_pulse)
-                               f->buf[len] += arg;
+                               f->buf[len-1] += arg;
                        else
                                f->buf[len++] = arg;
                        expect_pulse = false;

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to