Skip to content

entitylump: Output separator as spaces instead of tabs#1873

Merged
peace-maker merged 1 commit intoalliedmodders:masterfrom
nosoop:entlump-space-sep
Dec 5, 2022
Merged

entitylump: Output separator as spaces instead of tabs#1873
peace-maker merged 1 commit intoalliedmodders:masterfrom
nosoop:entlump-space-sep

Conversation

@nosoop
Copy link
Contributor

@nosoop nosoop commented Dec 5, 2022

On NMRiH and possibly other games that use the Maphack system, entries that are modified using that system are rendered with tab characters stripped out - see CNMRiHMapHackManager::GetEntDataString.

That results in there being no separators at all between keys and values, as Maphack receives the serialized string from Entity Lump Manager, which uses tabs as its key / value separator.

This crash only occurs if GetMapHackManager()->HasEntData() is set to true, so to my understanding it would not crash on removals of entire entities, and it would not crash on maps that do not use Maphack at all.

This commit changes the key / value separator character to use spaces instead.

Fixes #1833.

On NMRiH and possibly other games that use the Maphacks system,
entries that are modified using that system are rendered with tab
characters stripped out - see CNMRiHMapHackManager::GetEntDataString.

That results in there being no separators at all between keys and
values, as Maphacks receives the serialized string from Entity Lump
Manager.

This commit changes the key / value separator character to use
spaces instead.

This discovery upsets me greatly.

Fixes alliedmodders#1833.
@peace-maker
Copy link
Member

Good work!

@peace-maker peace-maker merged commit 6c5a3fd into alliedmodders:master Dec 5, 2022
@nosoop
Copy link
Contributor Author

nosoop commented Dec 5, 2022

@peace-maker can this also get backported into 1.11? The entity lump code was recently merged there.

I can open a new PR for it if that's necessary.

@KyleSanderson
Copy link
Member

@peace-maker can this also get backported into 1.11? The entity lump code was recently merged there.

I can open a new PR for it if that's necessary.

Yes

@nosoop nosoop deleted the entlump-space-sep branch December 7, 2022 04:05
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.

Crash from 6922 version

3 participants