Skip to content

Fix creation of invalid negative transport ids by cast uint32 -> int

Friedrich W. H. Kossebau requested to merge work/kossebau/fixid into release/21.08

Port of KRandom::random to QRandomGenerator in b5572156 missed that generate() uses all bits of the uint32, and the compiler does not warn when casting uint to int

Current code assumes only positive ids to be valid, so some checks will assume the transport is not correctly configured.

Also set 1 as lowest minimal value, as a 0 value will be discarded anyway.

@lbeltrame @mlaurent @vkrause

Merge request reports