fix passing a std::string to a printf function