fix initial value of function parameter as it leads to the first condition to be always true, fixes #1330

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>