Skip to content

Conversation

@sschr15
Copy link
Member

@sschr15 sschr15 commented Aug 31, 2024

No description provided.

private val cafebabe = listOf(0xCA, 0xFE, 0xBA, 0xBE).map(Int::toByte).toByteArray()

fun getLanguage(bytes: ByteArray): String? {
if (ArrayUtil.startsWith(bytes, cafebabe)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this? This condition is inverted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants