Skip to content

BugFix: correct missing detail (map label position) from binary map files#4694

Merged
vadi2 merged 1 commit intoMudlet:developmentfrom
SlySven:BugFix_correctMissingDetail(mapLabelPosition)fromBinaryMapFiles
Jan 27, 2021
Merged

BugFix: correct missing detail (map label position) from binary map files#4694
vadi2 merged 1 commit intoMudlet:developmentfrom
SlySven:BugFix_correctMissingDetail(mapLabelPosition)fromBinaryMapFiles

Conversation

@SlySven
Copy link
Copy Markdown
Member

@SlySven SlySven commented Jan 27, 2021

This will cause serious data loss (because it throws off the whole structure of the file) when reading existing files {because the label position element is not read from the file so everything after the first map label will not be at the expected offset} and writing new ones as they would not be storing the position detail rendering all map labels at the origin when read by the new code.

This defect was introduced in #4604 - ten days ago.

Signed-off-by: Stephen Lyons slysven@virginmedia.com

…iles

This will cause serious data loss (because it throws off the whole
structure of the file) when reading existing files {because the label
position element is not read from the file so everything after the first
map label will not be at the expected offset} and writing new ones as they
would not be storing the position detail rendering all map labels at the
origin when read by the new code.

This defect was introduced in Mudlet#4604 - ten days ago.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
@SlySven SlySven requested a review from a team as a code owner January 27, 2021 02:15
@SlySven SlySven requested a review from a team January 27, 2021 02:15
@add-deployment-links
Copy link
Copy Markdown

add-deployment-links bot commented Jan 27, 2021

Hey there! Thanks for helping Mudlet improve. 🌟

Test versions

You can directly test the changes here:

No need to install anything - just unzip and run.
Let us know if it works well, and if it doesn't, please give details.

@SlySven
Copy link
Copy Markdown
Member Author

SlySven commented Jan 27, 2021

🤦‍♂️ I am sorry about this boo-boo.

It means that any map files produced from the development branch since #4606 went in will be broken as the map label position was not included in the saved file - and then when read the missing detail will offset the bytes positions after the first map label so that all the remaining data, which includes ALL the rooms, will be corrupted.

@Nyyrazzilyss
Copy link
Copy Markdown
Contributor

Installed, reset my mapfile then exited/restarted a couple times. This fixes
#4692
and would appear to work for me.

@SlySven SlySven linked an issue Jan 27, 2021 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@Kebap Kebap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the bug

@vadi2 vadi2 merged commit d546dd9 into Mudlet:development Jan 27, 2021
@SlySven SlySven deleted the BugFix_correctMissingDetail(mapLabelPosition)fromBinaryMapFiles branch January 27, 2021 11:47
Chris7 pushed a commit to Chris7/Mudlet that referenced this pull request Jan 2, 2022
BugFix: correct missing detail (map label position) from binary map files

This will cause serious data loss (because it throws off the whole
structure of the file) when reading existing files {because the label
position element is not read from the file so everything after the first
map label will not be at the expected offset} and writing new ones as they
would not be storing the position detail rendering all map labels at the
origin when read by the new code.

This defect was introduced in Mudlet#4604 - ten days ago.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PTB not loading mapfile properly

4 participants