mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-09 07:20:40 +00:00
Fix evaluatef argument handling and add regression test
This commit is contained in:
parent
1278a97edc
commit
6de2b455c4
3 changed files with 40 additions and 3 deletions
|
|
@ -50,10 +50,13 @@ namespace Con
|
|||
/// NOTE: This function restores the console stack on return.
|
||||
inline EvalResult evaluatef(const char* string, ...)
|
||||
{
|
||||
char buffer[4096];
|
||||
va_list args;
|
||||
va_start(args, string);
|
||||
EvalResult result = setLastEvalResult(getRuntime()->evaluatef(string, args));
|
||||
va_start(args, &string);
|
||||
dVsprintf(buffer, sizeof(buffer), string, args);
|
||||
va_end(args);
|
||||
|
||||
EvalResult result = setLastEvalResult(getRuntime()->evaluate(buffer));
|
||||
return result;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue