mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 06:34:19 +00:00
parent
205e9b433d
commit
c1b98025f7
2 changed files with 4 additions and 2 deletions
|
@ -106,6 +106,8 @@ public abstract class SAV3 : SaveFile, ILangDeviantSave, IEventFlag37, IBoxDetai
|
||||||
{
|
{
|
||||||
var span = data[ofs..];
|
var span = data[ofs..];
|
||||||
var id = ReadInt16LittleEndian(span[0xFF4..]);
|
var id = ReadInt16LittleEndian(span[0xFF4..]);
|
||||||
|
if ((uint)id >= COUNT_MAIN)
|
||||||
|
return false; // invalid sector ID
|
||||||
bitTrack |= (1 << id);
|
bitTrack |= (1 << id);
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
sector0 = ofs;
|
sector0 = ofs;
|
||||||
|
|
|
@ -504,7 +504,7 @@ public partial class SAV_Misc3 : Form
|
||||||
public void SetFameTime(uint time)
|
public void SetFameTime(uint time)
|
||||||
{
|
{
|
||||||
NUD_FameH.Value = Math.Min(NUD_FameH.Maximum, time >> 16);
|
NUD_FameH.Value = Math.Min(NUD_FameH.Maximum, time >> 16);
|
||||||
NUD_FameM.Value = Math.Min(NUD_FameH.Maximum, (byte)(time >> 8));
|
NUD_FameM.Value = Math.Min(NUD_FameM.Maximum, (byte)(time >> 8));
|
||||||
NUD_FameS.Value = Math.Min(NUD_FameH.Maximum, (byte)time);
|
NUD_FameS.Value = Math.Min(NUD_FameS.Maximum, (byte)time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue