Fully save DOL once patched

This commit is contained in:
Spotlight 2021-12-31 04:02:28 -06:00
parent 42957bf13f
commit 04f03c72d3
No known key found for this signature in database
GPG Key ID: 874AA355B3209BDC
2 changed files with 9 additions and 2 deletions

View File

@ -107,7 +107,11 @@ func main() {
// Apply all DOL patches
fmt.Println(aurora.Green("Applying DOL patches..."))
applyDefaultPatches()
// Save main DOL
err = originalWad.UpdateContent(1, mainDol)
check(err)
// Load main ARC
arcData, err := originalWad.GetContent(2)
check(err)

View File

@ -1,6 +1,7 @@
package main
import (
"bytes"
"crypto/x509"
"encoding/binary"
"fmt"
@ -27,7 +28,9 @@ miip:*
[exclude]
*`, baseDomain)
file.Write([]byte(filter))
// Replace UNIX line (LR) returns with that of Windows (CRLF).
output := bytes.ReplaceAll([]byte(filter), []byte("\n"), []byte("\r\n"))
file.Write(output)
}
// Tag represents a single byte representing a tag's ID.