Off by one error in nextPrintableChar. Closes #4111, no review.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@23863 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
37fab48e00
commit
39a76d8b8e
|
@ -94,7 +94,8 @@ class Random(val self: java.util.Random) {
|
|||
* from the ASCII range 33-126.
|
||||
*/
|
||||
def nextPrintableChar(): Char = {
|
||||
val (low, high) = (33, 126)
|
||||
val low = 33
|
||||
val high = 127
|
||||
(self.nextInt(high - low) + low).toChar
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue