Skip to content

OcdFileExport: Fix map notes export to .ocd version 8 - #2041

Merged
dg0yt merged 1 commit into
OpenOrienteering:masterfrom
dl3sdo:mapnotesexport
Mar 23, 2022
Merged

OcdFileExport: Fix map notes export to .ocd version 8#2041
dg0yt merged 1 commit into
OpenOrienteering:masterfrom
dl3sdo:mapnotesexport

Conversation

@dl3sdo

Copy link
Copy Markdown
Member

If the size of the map notes exceeded 32768 the map notes were truncated when saving as OCAD 8.
However, instead of truncating to 32767 (the terminating 0 will be appended) it was truncated to 23767.
When testing the fix with OCAD12 it turned out that it was necessary to truncate to 32766, otherwise OCAD12 would not open the map.

@dl3sdo

Copy link
Copy Markdown
MemberAuthor

I attach a map (.omap) with 32776 bytes of map notes that I used for testing.
MapNotes_32776.zip

@dg0ytdg0yt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Not tested.

@dg0ytdg0yt added the reviewed PR was reviewed and is ready to be merged label Mar 22, 2022
If the size of the map notes exceeded 32768 the map notes were
truncated when saving as OCAD 8.
However, instead of truncating to 32767 (the terminating 0 will be
appended) it was truncated to 23767.
When testing the fix with OCAD12 it turned out that it was necessary
to truncate to 32766, otherwise OCAD12 would not open the map.
@dl3sdo

Copy link
Copy Markdown
MemberAuthor

I modified the commit message to better meet the guidelines for commit messages.

@dg0yt
dg0yt merged commit dfca4fc into OpenOrienteering:masterMar 23, 2022
@dg0yt

Copy link
Copy Markdown
Member

Thanks @dl3sdo !

@dl3sdo
dl3sdo deleted the mapnotesexport branch March 23, 2022 12:04
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewedPR was reviewed and is ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@dl3sdo@dg0yt