s/n > i - 1/n >= i/

This commit is contained in:
Anselm R. Garbe 2006-06-08 13:16:24 +02:00
parent e9b5f193bf
commit 643a3f14f6
1 changed files with 1 additions and 1 deletions

View File

@ -397,7 +397,7 @@ newcolw_of_view(View *v)
cext_strlcpy(buf, r->value, sizeof(buf));
n = cext_tokenize(toks, 16, buf, '+');
for(a=v->area, i=0; a; a=a->next, i++);
if(n && n > i - 1) {
if(n && n >= i) {
if(sscanf(toks[i - 1], "%u", &n) == 1)
return (rect.width * n) / 100;
}