mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 04:02:15 +02:00
test_proto: avoid -Wconversion warning
Instead of magic constant say what we want to say. So that randrange also produces the correct output type. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
This commit is contained in:
parent
73624b8331
commit
227a8e7a65
@ -803,7 +803,7 @@ class NoisyWire
|
||||
std::cout << now->raw() << " " << title << " Simulating a corrupted packet" << std::endl;
|
||||
#endif
|
||||
const size_t pos = random.randrange(bp->size());
|
||||
const unsigned char value = random.randrange(256);
|
||||
const unsigned char value = random.randrange(std::numeric_limits<unsigned char>::max());
|
||||
(*bp)[pos] = value;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user