From af85ea80edadb28ba7b6c3422579290522f4ed2f Mon Sep 17 00:00:00 2001 From: Joel16 Date: Fri, 18 May 2018 19:44:23 -0500 Subject: [PATCH] Make corrections --- nx/include/switch/services/set.h | 2 +- nx/source/services/set.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nx/include/switch/services/set.h b/nx/include/switch/services/set.h index 4c7eb3d2..cd4fc0a0 100644 --- a/nx/include/switch/services/set.h +++ b/nx/include/switch/services/set.h @@ -69,6 +69,6 @@ Result setsysGetColorSetId(ColorSetId* out); /** * @brief Gets the system's serial number. - * @param serial Pointer to output the serial to. (The buffer size needs to be at least 0x18 bytes) + * @param serial Pointer to output the serial to. (The buffer size needs to be at least 0x19 bytes) */ Result setsysGetSerialNumber(char *serial); diff --git a/nx/source/services/set.c b/nx/source/services/set.c index 40c9c822..6bf4b5c7 100644 --- a/nx/source/services/set.c +++ b/nx/source/services/set.c @@ -351,6 +351,8 @@ Result setsysGetSerialNumber(char *serial) { IpcCommand c; ipcInitialize(&c); + if (serial) memset(serial, 0, 0x19); + struct { u64 magic; u64 cmd_id;