'Out of range' error was a missing NUL-termination :)