testing to see if this fixes the github build issues (#715)

This commit is contained in:
lord 2020-09-06 14:09:05 -07:00 committed by GitHub
parent 439b2e7472
commit 52125932f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ func LoadAnimationData(rawData []byte) {
for i := 0; i < dataCount; i++ {
cofNameBytes := streamReader.ReadBytes(numCofNameBytes)
data := &AnimationDataRecord{
COFName: strings.ReplaceAll(string(cofNameBytes), string(0), ""),
COFName: strings.ReplaceAll(string(cofNameBytes), string(byte(0)), ""),
FramesPerDirection: int(streamReader.GetInt32()),
AnimationSpeed: int(streamReader.GetInt32()),
}

View File

@ -32,8 +32,8 @@ func LoadObjectTypes(objectTypeData []byte) {
nameBytes := streamReader.ReadBytes(nameSize)
tokenBytes := streamReader.ReadBytes(tokenSize)
ObjectTypes[i] = ObjectTypeRecord{
Name: strings.TrimSpace(strings.ReplaceAll(string(nameBytes), string(0), "")),
Token: strings.TrimSpace(strings.ReplaceAll(string(tokenBytes), string(0), "")),
Name: strings.TrimSpace(strings.ReplaceAll(string(nameBytes), string(byte(0)), "")),
Token: strings.TrimSpace(strings.ReplaceAll(string(tokenBytes), string(byte(0)), "")),
}
}

View File

@ -44,7 +44,7 @@ func Load(fileData []byte) (*COF, error) {
layer.Transparent = streamReader.GetByte() != 0
layer.DrawEffect = d2enum.DrawEffect(streamReader.GetByte())
weaponClassStr := streamReader.ReadBytes(4) //nolint:gomnd // Binary data
layer.WeaponClass = d2enum.WeaponClassFromString(strings.TrimSpace(strings.ReplaceAll(string(weaponClassStr), string(0), "")))
layer.WeaponClass = d2enum.WeaponClassFromString(strings.TrimSpace(strings.ReplaceAll(string(weaponClassStr), string(byte(0)), "")))
result.CofLayers[i] = layer
result.CompositeLayers[layer.Type] = i
}