From da677e9c64738ba51206baefddedfde89333e23d Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sun, 11 Feb 2018 11:45:24 +0100 Subject: [PATCH] fix bug in osstring_invalid_string (windows) --- src/arbitrary/_std/env.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arbitrary/_std/env.rs b/src/arbitrary/_std/env.rs index e96fc6aa..4ca6127c 100644 --- a/src/arbitrary/_std/env.rs +++ b/src/arbitrary/_std/env.rs @@ -71,7 +71,7 @@ fn make_utf16_invalid(buf: &mut Vec, p: usize) { #[cfg(target_os = "windows")] fn osstring_invalid_string() -> BoxedStrategy { use std::os::windows::ffi::OsStringExt; - let size = 0..::std::u16::MAX as usize; + let size = 1..::std::u16::MAX as usize; let vec_gen = ::collection::vec(..::std::u16::MAX, size.clone()); (size, vec_gen).prop_map(|(p, mut sbuf)| { // Not quite a uniform distribution due to clamping,