]> git.lizzy.rs Git - rust.git/commit
Remove inappropriate .to_c_str() in C_cstr()
authorKevin Ballard <kevin@sb.org>
Thu, 15 Aug 2013 06:40:28 +0000 (23:40 -0700)
committerKevin Ballard <kevin@sb.org>
Thu, 15 Aug 2013 08:33:10 +0000 (01:33 -0700)
commit5ca4cdc7b8fb8b9c3fd1a6160db31ff2f4b5b957
tree5d359043430260f6d188a914a61bc62b90ac0519
parentf744cf157ef7c85736796eca937aa43cbd681a0a
Remove inappropriate .to_c_str() in C_cstr()

LLVMConstStringInContext() doesn't need a null-terminated string. It
takes a length instead. Using .to_c_str() here triggers an ICE whenever
the string literal embeds a null, as in "\x00".
src/librustc/middle/trans/common.rs
src/librustc/middle/trans/tvec.rs