fix(SmaliPatching): remove CRLF and trailing newlines

This commit is contained in:
rushiiMachine 2025-01-11 12:48:44 -08:00
parent 3edbc03f3a
commit 441a84ef66
No known key found for this signature in database
GPG key ID: DCBE5952BB3B6420

View file

@ -47,6 +47,8 @@ class SmaliPatchStep : Step(), IDexProvider, KoinComponent {
val lines = zip.openEntry(patchFile)!!.read()
.decodeToString()
.replace("\r\n", "\n") // Replace CRLF endings with LF endings to be sure here
.trimEnd { it == '\n' } // Remove trailing new lines to work with diff output properly
.split('\n')
try {