Skip to content

Commit

Permalink
Set the proper byte length of the Application#icon
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Jan 13, 2024
1 parent 8faad62 commit 4bb8a5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/six-dodos-flash.md
@@ -0,0 +1,5 @@
---
'nxjs-runtime': patch
---

Set the proper byte length of the `Application#icon`
3 changes: 2 additions & 1 deletion source/ns.c
Expand Up @@ -54,7 +54,8 @@ static JSValue nx_ns_application_record(JSContext *ctx, JSValueConst this_val, i
return JS_EXCEPTION;
}
JS_SetPropertyStr(ctx, val, "nacp", JS_NewArrayBufferCopy(ctx, (const uint8_t *)&controlData.nacp, sizeof(controlData.nacp)));
JS_SetPropertyStr(ctx, val, "icon", JS_NewArrayBufferCopy(ctx, (const uint8_t *)&controlData.icon, sizeof(controlData.icon)));
size_t iconSize = outSize - sizeof(controlData.nacp);
JS_SetPropertyStr(ctx, val, "icon", JS_NewArrayBufferCopy(ctx, (const uint8_t *)&controlData.icon, iconSize));

NacpLanguageEntry *langEntry;
rc = nacpGetLanguageEntry(&controlData.nacp, &langEntry);
Expand Down

0 comments on commit 4bb8a5c

Please sign in to comment.