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 // Apply all DOL patches
fmt.Println(aurora.Green("Applying DOL patches...")) fmt.Println(aurora.Green("Applying DOL patches..."))
applyDefaultPatches() applyDefaultPatches()
// Save main DOL
err = originalWad.UpdateContent(1, mainDol)
check(err)
// Load main ARC // Load main ARC
arcData, err := originalWad.GetContent(2) arcData, err := originalWad.GetContent(2)
check(err) check(err)

View File

@ -1,6 +1,7 @@
package main package main
import ( import (
"bytes"
"crypto/x509" "crypto/x509"
"encoding/binary" "encoding/binary"
"fmt" "fmt"
@ -27,7 +28,9 @@ miip:*
[exclude] [exclude]
*`, baseDomain) *`, 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. // Tag represents a single byte representing a tag's ID.