mirror of
https://wiilab.wiimart.org/wiimart/WiiSOAP
synced 2025-09-05 21:11:02 +02:00
Ensure title ID is lowercase
This commit is contained in:
parent
63fbffeabc
commit
24976315d4
5
ecs.go
5
ecs.go
@ -22,6 +22,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/wii-tools/wadlib"
|
"github.com/wii-tools/wadlib"
|
||||||
"log"
|
"log"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -121,6 +122,9 @@ func purchaseTitle(e *Envelope) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We store title IDs in lowercase.
|
||||||
|
titleId = strings.ToLower(titleId)
|
||||||
|
|
||||||
// Query the ticket and current version for this title.
|
// Query the ticket and current version for this title.
|
||||||
var ticket []byte
|
var ticket []byte
|
||||||
var version int
|
var version int
|
||||||
@ -131,6 +135,7 @@ func purchaseTitle(e *Envelope) {
|
|||||||
log.Printf("unexpected error purchasing: %v", err)
|
log.Printf("unexpected error purchasing: %v", err)
|
||||||
// TODO(spotlightishere): Can we more elegantly return an error when a title may not exist here?
|
// TODO(spotlightishere): Can we more elegantly return an error when a title may not exist here?
|
||||||
e.Error(2, "error purchasing", nil)
|
e.Error(2, "error purchasing", nil)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Associate the given title ID with the user.
|
// Associate the given title ID with the user.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user