]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
vfo display: step off by one, turn it to green
authorRamakrishnan Muthukrishnan <ram@leastauthority.com>
Wed, 30 Nov 2022 17:20:53 +0000 (22:50 +0530)
committerRamakrishnan Muthukrishnan <ram@leastauthority.com>
Wed, 30 Nov 2022 17:20:53 +0000 (22:50 +0530)
vfo.c

diff --git a/vfo.c b/vfo.c
index 9fa09ef9fef9f9bb1fdd6de379461311e935ed06..d31356d34f5f6b3eebc284e3886644e9a5eeb430 100644 (file)
--- a/vfo.c
+++ b/vfo.c
@@ -948,8 +948,8 @@ char **draw_vfo_val_fixed(char *vfo_str, int step) {
 
     int l_temp = strlen(temp);
     if (step < l_temp) {
-        strncpy(s2, temp, l_temp - step);
-        strncpy(s3, &temp[l_temp - step], step);
+        strncpy(s2, temp, l_temp - step - 1);
+        strncpy(s3, &temp[l_temp - step - 1], step+1);
     } else {
         strncpy(s2, temp, l_temp);
     }
@@ -1086,7 +1086,7 @@ void vfo_update() {
         /*     cairo_set_source_rgb(cr, 0.0, 1.0, 1.0); // 0.75, 0.75, 0.75); */
         /*     cairo_show_text(cr, "."); */
         /* } */
-        cairo_set_source_rgb(cr, 0.75, 1.0, 1.0); // 0.75, 0.75);
+        cairo_set_source_rgb(cr, 0.0, 1.0, 0.0); // 0.75, 0.75);
         cairo_show_text(cr, vfo_texts[2]);
 
         cairo_select_font_face(cr, "Cantarell",