File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ static GString *gen_header(const struct sr_output *o)
8888 GString * header ;
8989 GSList * l ;
9090 time_t t ;
91- int num_channels , i ;
91+ int num_channels , i , p ;
9292 char * samplerate_s , * frequency_s , * timestamp ;
9393
9494 ctx = o -> priv ;
@@ -140,14 +140,16 @@ static GString *gen_header(const struct sr_output *o)
140140 g_string_append_printf (header , "$scope module %s $end\n" , PACKAGE );
141141
142142 /* Wires / channels */
143+ p = 0 ;
143144 for (i = 0 , l = o -> sdi -> channels ; l ; l = l -> next , i ++ ) {
144145 ch = l -> data ;
145146 if (ch -> type != SR_CHANNEL_LOGIC )
146147 continue ;
147148 if (!ch -> enabled )
148149 continue ;
149150 g_string_append_printf (header , "$var wire 1 %c %s $end\n" ,
150- (char )('!' + i ), ch -> name );
151+ (char )('!' + p ), ch -> name );
152+ p ++ ;
151153 }
152154
153155 g_string_append (header , "$upscope $end\n$enddefinitions $end\n" );
You can’t perform that action at this time.
0 commit comments