mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-10-21 11:01:40 +00:00
51fa1b2cb0
* timezone: Make timezone implementation safe * hle: Do not use TrimEnd to parse ASCII strings This adds an util that handle reading an ASCII string in a safe way. Previously it was possible to read malformed data that could cause various undefined behaviours in multiple services. * hid: Remove an useless unsafe modifier on keyboard update * Address gdkchan's comment * Address gdkchan's comment
19 lines
No EOL
515 B
C#
19 lines
No EOL
515 B
C#
using Ryujinx.Common.Memory;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Time.TimeZone
|
|
{
|
|
[StructLayout(LayoutKind.Sequential, Pack = 0x4, Size = 0x2C)]
|
|
struct TzifHeader
|
|
{
|
|
public Array4<byte> Magic;
|
|
public byte Version;
|
|
private Array15<byte> _reserved;
|
|
public int TtisGMTCount;
|
|
public int TtisSTDCount;
|
|
public int LeapCount;
|
|
public int TimeCount;
|
|
public int TypeCount;
|
|
public int CharCount;
|
|
}
|
|
} |