From: Francisco Jerez Date: Mon, 18 Aug 2014 06:05:25 +0000 (+0300) Subject: clover: Use conversion operator to initialize build log from compat::string. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=995f7b37dad75999ce09f29fe999a8c30e899bb0;p=mesa.git clover: Use conversion operator to initialize build log from compat::string. Fixes binary garbage in the compilation logs caused by compat::string::c_str() not being null-terminated (which is a bug on its own that will be fixed in another commit). Reported-by: EdB --- diff --git a/src/gallium/state_trackers/clover/core/program.cpp b/src/gallium/state_trackers/clover/core/program.cpp index 30a1f0e0762..6c224dbe083 100644 --- a/src/gallium/state_trackers/clover/core/program.cpp +++ b/src/gallium/state_trackers/clover/core/program.cpp @@ -61,9 +61,9 @@ program::build(const ref_vector &devs, const char *opts) { dev.ir_target(), build_opts(dev), log)); _binaries.insert({ &dev, module }); - _logs.insert({ &dev, std::string(log.c_str()) }); + _logs.insert({ &dev, log }); } catch (const build_error &) { - _logs.insert({ &dev, std::string(log.c_str()) }); + _logs.insert({ &dev, log }); throw; } }