Browse Source

Fix invalid Char code exception for readLinePositions (#751)

examples_0.5.0-build220
Drakeet 4 years ago committed by GitHub
parent
commit
ee1a8f1ab2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      examples/codeviewer/common/src/jvmMain/kotlin/org/jetbrains/codeviewer/platform/JvmFile.kt

2
examples/codeviewer/common/src/jvmMain/kotlin/org/jetbrains/codeviewer/platform/JvmFile.kt

@ -94,7 +94,7 @@ private fun java.io.File.readLinePositions(
if (isBeginOfLine) {
starts.add(position.toInt())
}
isBeginOfLine = Char(byte.toInt()) == '\n'
isBeginOfLine = byte.toInt().toChar() == '\n'
position++
}
channel.close()

Loading…
Cancel
Save