mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Update "SetStringKeepTerminatorStyle" to resolve "?" OT bug. (#3778)
This commit is contained in:
parent
92b841881d
commit
386c7078db
1 changed files with 2 additions and 5 deletions
|
@ -107,10 +107,7 @@ public abstract class GBPKML : GBPKM
|
|||
{
|
||||
// Reset the destination buffer based on the termination style of the existing string.
|
||||
bool zeroed = exist.IndexOf((byte)0) != -1;
|
||||
byte fill = zeroed ? (byte)0 : StringConverter12.G1TerminatorCode;
|
||||
exist.Fill(fill);
|
||||
|
||||
int finalLength = Math.Min(value.Length + 1, exist.Length);
|
||||
SetString(value, exist, finalLength);
|
||||
StringConverterOption converterOption = (zeroed) ? StringConverterOption.ClearZero : StringConverterOption.Clear50;
|
||||
SetString(value, exist, value.Length, converterOption);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue