End string in custom win strncpy function, repair position_of_char proper function

Signed-off-by: Frca <killerfrca@gmail.com>