idz: Trim trailing NULs in team name

This commit is contained in:
Tau
2019-11-06 17:28:30 -05:00
parent faaeb53cd9
commit 7c96253160
+4 -1
View File
@@ -12,7 +12,10 @@ export function createTeam(buf: Buffer): CreateTeamRequest {
return {
type: "create_team_req",
profileId: buf.readUInt32LE(0x0004) as ExtId<Profile>,
teamName: iconv.decode(buf.slice(0x0008, 0x0028), "shift_jis"),
teamName: iconv.decode(
buf.slice(0x0008, buf.indexOf("\0", 0x0008)),
"shift_jis"
),
field_0028: buf.readUInt16LE(0x0028),
field_002C: buf.readUInt32LE(0x002c),
nameBg: buf.readUInt8(0x0030),