Skip to content

Fix editData in HTML/UWP extensions allocating too much data#31

Open
AITYunivers wants to merge 1 commit intoSortaCore:masterfrom
AITYunivers:data-alloc-size-fix
Open

Fix editData in HTML/UWP extensions allocating too much data#31
AITYunivers wants to merge 1 commit intoSortaCore:masterfrom
AITYunivers:data-alloc-size-fix

Conversation

@AITYunivers
Copy link
Copy Markdown

editData is allocated using
(in v1)

this.sizeBytes - header.byteLength

(in v2)

this.sizeBytes -
// skip area between eHeader -> Props
(ext.ho.privateData - 20) -
// Skip DarkEdif header
header.byteLength

neither of these equations account for the size of eHeader, and in v2 the header not including verStr in it's length.

This PR fixes these by subtracting eHeader and by subtracting 4 (in the Template only as the extensions are v1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant