Thanks, this seems to fix it. > if (w > 0) > i += l; > - else if (w < 0) > + else if (w <= 0) > return i == 0 ? w : i; > } this makes the second condition "if (true)". Olaf