DatabasePrint: cast int to unsigned before comparison

Fixes compiler warning.