File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ func getCharacter(c *gin.Context) {
51
51
52
52
// workaround for invalid json parsing values
53
53
for _ , d := range char .GbxZoneMapFodSaveGameData .LevelData {
54
- if * d .DiscoveryPercentage > math .MaxFloat32 {
54
+ if d . DiscoveryPercentage != nil && * d .DiscoveryPercentage > math .MaxFloat32 {
55
55
* d .DiscoveryPercentage = - 1
56
56
}
57
57
}
@@ -77,7 +77,7 @@ func updateCharacter(c *gin.Context) {
77
77
}
78
78
// workaround for invalid json parsing values
79
79
for _ , d := range d .Character .GbxZoneMapFodSaveGameData .LevelData {
80
- if * d .DiscoveryPercentage == - 1 {
80
+ if d . DiscoveryPercentage != nil && * d .DiscoveryPercentage == - 1 {
81
81
* d .DiscoveryPercentage = math .Float32frombits (0x7F800000 ) // inf
82
82
}
83
83
}
You can’t perform that action at this time.
0 commit comments