Use unsigned variable in random dealer to avoid undefined behaviour
Differential Revision: https://phabricator.kde.org/D15716