Skip to content

Commit

Permalink
fix: load
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed May 8, 2023
1 parent 2978462 commit 927fe5d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import kotlinx.serialization.builtins.*
import kotlinx.serialization.json.*
import net.mamoe.mirai.*
import net.mamoe.mirai.utils.*
import net.mamoe.mirai.utils.DeviceInfo.Companion.loadAsDeviceInfo
import kotlin.random.*

public class MiraiDeviceGenerator {
Expand Down Expand Up @@ -45,7 +46,8 @@ public class MiraiDeviceGenerator {
file.writeText(DeviceInfoManager.serialize(it))
}
}
return DeviceInfoManager.deserialize(file.readText())
// 23/05/08 fix: DeviceInfoManager.deserialize(file.readText())
return file.loadAsDeviceInfo()
}

public fun generate(): DeviceInfo {
Expand Down

0 comments on commit 927fe5d

Please sign in to comment.