mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-13 05:28:14 +08:00
bug
This commit is contained in:
@@ -60,6 +60,7 @@ void SetPowerRecord(PowerRecord* pr, uint32_t pw)
|
|||||||
char* GetPowerRecord(int idx)
|
char* GetPowerRecord(int idx)
|
||||||
{
|
{
|
||||||
if (idx > power_record.idx) return "";
|
if (idx > power_record.idx) return "";
|
||||||
|
idx = idx <= power_record.idx - PW_NUM ? 0 : idx;
|
||||||
|
|
||||||
int i = idx > 0 ? idx : (power_record.idx - PW_NUM + 1);
|
int i = idx > 0 ? idx : (power_record.idx - PW_NUM + 1);
|
||||||
i = i < 0 ? 0 : i;
|
i = i < 0 ? 0 : i;
|
||||||
|
|||||||
Reference in New Issue
Block a user