• Advertisement
Sign in to follow this  

WriteConfigToStream fails to reset namespace

Recommended Posts

The WriteConfigToStream function in scripthelper.cpp fails to reset the namespace when it writes out the string factory and array type. This can result in the wrong namespace being used. For example:

prop "const uint ClientDisconnect"
namespace "Hooks::Game"
prop "const uint MapChange"

// String factory
strfactory "string"

// Default array type
defarray "array<T>"

These are the last few lines of a config i'm reading in.

 

Should be easy enough to fix, just add the same code to reset the namespace. I would recommend refactoring that code so the logic is in its own function, perhaps turn these helpers into classes so the current namespace is kept as a member. That's simpler than passing in a reference.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement