Fix passing value instead of name to AooRE
and leave a note for myself re: patches
This commit is contained in:
parent
e86bbb6136
commit
ae1692f2e1
|
@ -22,8 +22,8 @@ namespace BizHawk.Emulation.Common
|
||||||
static bool IsAllowedCharacter(char c)
|
static bool IsAllowedCharacter(char c)
|
||||||
=> c is '-' or (>= '0' and <= '9') or (>= 'A' and <= 'Z') or '_' or (>= 'a' and <= 'z');
|
=> c is '-' or (>= '0' and <= '9') or (>= 'A' and <= 'Z') or '_' or (>= 'a' and <= 'z');
|
||||||
const string ERR_MSG_INVALID_CHAR = "FWIDs must match /[-0-9A-Z_a-z]+/";
|
const string ERR_MSG_INVALID_CHAR = "FWIDs must match /[-0-9A-Z_a-z]+/";
|
||||||
if (!system.All(IsAllowedCharacter)) throw new ArgumentOutOfRangeException(paramName: system, actualValue: system, message: ERR_MSG_INVALID_CHAR);
|
if (!system.All(IsAllowedCharacter)) throw new ArgumentOutOfRangeException(paramName: nameof(system), actualValue: system, message: ERR_MSG_INVALID_CHAR);
|
||||||
if (!firmware.All(IsAllowedCharacter)) throw new ArgumentOutOfRangeException(paramName: firmware, actualValue: firmware, message: ERR_MSG_INVALID_CHAR);
|
if (!firmware.All(IsAllowedCharacter)) throw new ArgumentOutOfRangeException(paramName: nameof(firmware), actualValue: firmware, message: ERR_MSG_INVALID_CHAR);
|
||||||
System = system;
|
System = system;
|
||||||
Firmware = firmware;
|
Firmware = firmware;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,10 @@ namespace BizHawk.Emulation.Common
|
||||||
/// Represents a binary patch, to be applied to a byte array. Patches must be contiguous; multiple instances can be used to for non-contiguous patches.
|
/// Represents a binary patch, to be applied to a byte array. Patches must be contiguous; multiple instances can be used to for non-contiguous patches.
|
||||||
/// Patches usually contain data which needs to be XOR'd with a base file, but with <see cref="Overwrite"/> set to <see langword="true"/>, this struct can represent data which should replace part of a base file.
|
/// Patches usually contain data which needs to be XOR'd with a base file, but with <see cref="Overwrite"/> set to <see langword="true"/>, this struct can represent data which should replace part of a base file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>TODO no mechanism to change length, would that be useful? --yoshi</remarks>
|
/// <remarks>
|
||||||
|
/// TODO no mechanism to change length, would that be useful? --yoshi<br/>
|
||||||
|
/// upon further reflection, I'm heading towards what is effectively a worse .bps, so maybe just use that --a later yoshi
|
||||||
|
/// </remarks>
|
||||||
public readonly struct FirmwarePatchData
|
public readonly struct FirmwarePatchData
|
||||||
{
|
{
|
||||||
public readonly byte[] Contents;
|
public readonly byte[] Contents;
|
||||||
|
|
Loading…
Reference in New Issue