]> git.lizzy.rs Git - rust.git/commit
auto merge of #12396 : alexcrichton/rust/windows-env-var, r=huonw
authorbors <bors@rust-lang.org>
Thu, 20 Feb 2014 08:36:53 +0000 (00:36 -0800)
committerbors <bors@rust-lang.org>
Thu, 20 Feb 2014 08:36:53 +0000 (00:36 -0800)
commitf76628d3904454241e41acb033f6ececfdd08b4c
tree209bc56e103f1518329622b8390d17c84ed5f84e
parentb5e35736b0d62386081ccfb054fe44ae676a091b
parent9347096d54a983d47996c5f8020dbec04fea81fa
auto merge of #12396 : alexcrichton/rust/windows-env-var, r=huonw

On windows, the GetEnvironmentVariable function will return the necessary buffer
size if the buffer provided was too small. This case previously fell through the
checks inside of fill_utf16_buf_and_decode, tripping an assertion in the `slice`
method.

This adds an extra case for when the return value is >= the buffer size, in
which case we assume the return value as the new buffer size and try again.

Closes #12376