mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-09-18 18:27:18 +02:00
Initial implementation of the new event system.
Initial implementation of the new signals and slots class. Fixed command parsing which compared a pointer to a character. Buffer overflow fix in routines which used the limits from the entity tasks. Switched from Sqrat::Object to Sqrat::LightObj in most places to avoid the overhead of the VM pointer. Various other adjustments and improvements. The plugin is currently in a broken state and crashes at shutdown. The bug is unknown at this point.
This commit is contained in:
@@ -212,7 +212,7 @@ Int32 Controller::Run(const Guard & guard, CCStr command)
|
||||
++split;
|
||||
}
|
||||
// Are there any arguments specified?
|
||||
if (split != '\0')
|
||||
if (*split != '\0')
|
||||
{
|
||||
// Save the command name
|
||||
ctx.mCommand.assign(command, (split - command));
|
||||
@@ -665,13 +665,13 @@ bool Controller::Parse(Context & ctx)
|
||||
{
|
||||
// Let's us know if the whole argument was part of the resulted value
|
||||
CStr next = nullptr;
|
||||
// Attempt to extract the integer value from the string
|
||||
// Attempt to extract the float value from the string
|
||||
#ifdef SQUSEDOUBLE
|
||||
const Float64 value = std::strtod(str, &next);
|
||||
#else
|
||||
const Float32 value = std::strtof(str, &next);
|
||||
#endif // SQUSEDOUBLE
|
||||
// See if this whole string was indeed an integer
|
||||
// See if this whole string was indeed an float
|
||||
if (next == end)
|
||||
{
|
||||
// Remember the current stack size
|
||||
|
Reference in New Issue
Block a user