Advertisement

WriteConfigToStream fails to reset namespace

Started by June 02, 2017 04:30 PM
1 comment, last by WitchLord 7 years, 5 months ago

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.

Thanks. I'll have this fixed.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Advertisement

I've fixed this in revision 2397.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement