--- a/src/lib/randomness/krandom.cpp
+++ b/src/lib/randomness/krandom.cpp
@@ -62,7 +62,7 @@
         if (r > 90) {
             r += 6;
         }
-        str[i++] =  char(r);
+        str[i++] = QLatin1Char(char(r));
         // so what if I work backwards?
     }
     return str;
