fixing c->weight handling 1b3903d6
Anselm R. Garbe · 2006-09-05 08:24 1 file(s) · +3 −2
tag.c +3 −2
106 106
	if(!matched)
107 107
		for(i = 0; i < ntags; i++)
108 108
			c->tags[i] = seltag[i];
109 -
	for(i = 0; i < ntags && !c->tags[i]; i++);
110 -
	c->weight = i;
109 +
	for(c->weight = 0; c->weight < ntags && !c->tags[c->weight]; c->weight++);
111 110
}
112 111
113 112
void
121 120
	for(i = 0; i < ntags; i++)
122 121
		sel->tags[i] = False;
123 122
	sel->tags[arg->i] = True;
123 +
	sel->weight = arg->i;
124 124
	arrange(NULL);
125 125
}
126 126
136 136
	for(i = 0; i < ntags && !sel->tags[i]; i++);
137 137
	if(i == ntags)
138 138
		sel->tags[arg->i] = True;
139 +
	for(sel->weight = 0; sel->weight < ntags && !sel->tags[sel->weight]; sel->weight++);
139 140
	arrange(NULL);
140 141
}