mirror of
https://github.com/switchbrew/switch-tools.git
synced 2025-06-27 16:02:40 +02:00
Limited the name to 10 characters. Added product code.
This commit is contained in:
parent
9d39e91fb0
commit
4d7340d64c
@ -79,7 +79,9 @@ typedef struct {
|
|||||||
u64 _0x10;
|
u64 _0x10;
|
||||||
u32 ProcessCategory;
|
u32 ProcessCategory;
|
||||||
u32 MainThreadStackSize;
|
u32 MainThreadStackSize;
|
||||||
char Name[0x50];
|
char Name[0x10];
|
||||||
|
char ProductCode[0x10];
|
||||||
|
u8 _0x40[0x30];
|
||||||
u32 Aci0Offset;
|
u32 Aci0Offset;
|
||||||
u32 Aci0Size;
|
u32 Aci0Size;
|
||||||
u32 AcidOffset;
|
u32 AcidOffset;
|
||||||
@ -281,6 +283,12 @@ int CreateNpdm(const char *json, void **dst, u32 *dst_size) {
|
|||||||
goto NPDM_BUILD_END;
|
goto NPDM_BUILD_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Parse product code. */
|
||||||
|
const cJSON *product_code = cJSON_GetObjectItemCaseSensitive(npdm_json, "product_code");
|
||||||
|
if (cJSON_IsString(product_code) && (product_code->valuestring != NULL)) {
|
||||||
|
strncpy(header.ProductCode, product_code->valuestring, sizeof(header.ProductCode) - 1);
|
||||||
|
}
|
||||||
|
|
||||||
/* Parse main_thread_stack_size. */
|
/* Parse main_thread_stack_size. */
|
||||||
u64 stack_size = 0;
|
u64 stack_size = 0;
|
||||||
if (!cJSON_GetU64(npdm_json, "main_thread_stack_size", &stack_size)) {
|
if (!cJSON_GetU64(npdm_json, "main_thread_stack_size", &stack_size)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user