I don't understand...

There's any kind of bug anywere, your function works flawlesly and the simple one I've post at the beggining of the topic does not...

If it is not a bug... what I'm doing wrong????
_________________________
Regards