mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
Shorten string get/set to valid range
Implicit terminator set
This commit is contained in:
parent
3fdf1396aa
commit
0d3cb1f6ad
3 changed files with 6 additions and 6 deletions
|
@ -189,7 +189,7 @@ namespace PKHeX.Core
|
|||
#endregion
|
||||
|
||||
#region Block C
|
||||
public override string Nickname { get => GetString(0x48, 24); set => SetString(value, 11).CopyTo(Data, 0x48); }
|
||||
public override string Nickname { get => GetString(0x48, 20); set => SetString(value, 10).CopyTo(Data, 0x48); }
|
||||
// 0x5E unused
|
||||
public override int Version { get => Data[0x5F]; set => Data[0x5F] = (byte)value; }
|
||||
private byte RIB8 { get => Data[0x60]; set => Data[0x60] = value; } // Sinnoh 3
|
||||
|
@ -232,7 +232,7 @@ namespace PKHeX.Core
|
|||
#endregion
|
||||
|
||||
#region Block D
|
||||
public override string OT_Name { get => GetString(0x68, 16); set => SetString(value, 7).CopyTo(Data, 0x68); }
|
||||
public override string OT_Name { get => GetString(0x68, 14); set => SetString(value, 7).CopyTo(Data, 0x68); }
|
||||
public override int Egg_Year { get => Data[0x78]; set => Data[0x78] = (byte)value; }
|
||||
public override int Egg_Month { get => Data[0x79]; set => Data[0x79] = (byte)value; }
|
||||
public override int Egg_Day { get => Data[0x7A]; set => Data[0x7A] = (byte)value; }
|
||||
|
|
|
@ -168,7 +168,7 @@ namespace PKHeX.Core
|
|||
#endregion
|
||||
|
||||
#region Block C
|
||||
public override string Nickname { get => GetString(0x48, 22); set => SetString(value, 11).CopyTo(Data, 0x48); }
|
||||
public override string Nickname { get => GetString(0x48, 20); set => SetString(value, 10).CopyTo(Data, 0x48); }
|
||||
// 0x5E unused
|
||||
public override int Version { get => Data[0x5F]; set => Data[0x5F] = (byte)value; }
|
||||
private byte RIB8 { get => Data[0x60]; set => Data[0x60] = value; } // Sinnoh 3
|
||||
|
@ -211,7 +211,7 @@ namespace PKHeX.Core
|
|||
#endregion
|
||||
|
||||
#region Block D
|
||||
public override string OT_Name { get => GetString(0x68, 16); set => SetString(value, 7).CopyTo(Data, 0x68); }
|
||||
public override string OT_Name { get => GetString(0x68, 14); set => SetString(value, 7).CopyTo(Data, 0x68); }
|
||||
public override int Egg_Year { get => Data[0x78]; set => Data[0x78] = (byte)value; }
|
||||
public override int Egg_Month { get => Data[0x79]; set => Data[0x79] = (byte)value; }
|
||||
public override int Egg_Day { get => Data[0x7A]; set => Data[0x7A] = (byte)value; }
|
||||
|
|
|
@ -186,7 +186,7 @@ namespace PKHeX.Core
|
|||
#endregion
|
||||
|
||||
#region Block C
|
||||
public override string Nickname { get => GetString(0x48, 22); set => SetString(value, 11).CopyTo(Data, 0x48); }
|
||||
public override string Nickname { get => GetString(0x48, 20); set => SetString(value, 10).CopyTo(Data, 0x48); }
|
||||
// 0x5E unused
|
||||
public override int Version { get => Data[0x5F]; set => Data[0x5F] = (byte)value; }
|
||||
private byte RIB8 { get => Data[0x60]; set => Data[0x60] = value; } // Sinnoh 3
|
||||
|
@ -229,7 +229,7 @@ namespace PKHeX.Core
|
|||
#endregion
|
||||
|
||||
#region Block D
|
||||
public override string OT_Name { get => GetString(0x68, 0x16); set => SetString(value, 7).CopyTo(Data, 0x68); }
|
||||
public override string OT_Name { get => GetString(0x68, 14); set => SetString(value, 7).CopyTo(Data, 0x68); }
|
||||
public override int Egg_Year { get => Data[0x78]; set => Data[0x78] = (byte)value; }
|
||||
public override int Egg_Month { get => Data[0x79]; set => Data[0x79] = (byte)value; }
|
||||
public override int Egg_Day { get => Data[0x7A]; set => Data[0x7A] = (byte)value; }
|
||||
|
|
Loading…
Reference in a new issue