Never use Script = strf(), chances of failure are about 100%. Use a real char buffer instead.