mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-09-24 21:27:17 +02:00
Minor adjustments to the code and several bug-fixes.
This commit is contained in:
@@ -1081,11 +1081,11 @@ static SQInteger SqNameFilterCheckInsensitive(HSQUIRRELVM vm)
|
||||
void Register_Base(HSQUIRRELVM vm)
|
||||
{
|
||||
RootTable(vm)
|
||||
.Func(_SC("EpsEq"), &EpsEq< SQFloat >)
|
||||
.Func(_SC("EpsLt"), &EpsLt< SQFloat >)
|
||||
.Func(_SC("EpsGt"), &EpsGt< SQFloat >)
|
||||
.Func(_SC("EpsLtEq"), &EpsLtEq< SQFloat >)
|
||||
.Func(_SC("EpsGtEq"), &EpsGtEq< SQFloat >)
|
||||
.Func(_SC("EpsEq"), &EpsEq< SQFloat, SQFloat >)
|
||||
.Func(_SC("EpsLt"), &EpsLt< SQFloat, SQFloat >)
|
||||
.Func(_SC("EpsGt"), &EpsGt< SQFloat, SQFloat >)
|
||||
.Func(_SC("EpsLtEq"), &EpsLtEq< SQFloat, SQFloat >)
|
||||
.Func(_SC("EpsGtEq"), &EpsGtEq< SQFloat, SQFloat >)
|
||||
.Func(_SC("ClampI"), &Clamp< SQInteger, SQInteger, SQInteger >)
|
||||
.Func(_SC("ClampF"), &Clamp< SQFloat, SQFloat, SQFloat >)
|
||||
.Func(_SC("ClampMinI"), &ClampMin< SQInteger, SQInteger >)
|
||||
|
@@ -225,7 +225,7 @@ Int64 Chrono::DateRangeToSeconds(Uint16 _year, Uint8 _month, Uint8 _day, Uint16
|
||||
// Are we within the same year?
|
||||
if (_year == year_)
|
||||
{
|
||||
return std::abs((DayOfYear(_year, _month, _day) - DayOfYear(year_, month_, day_)) * 86400ULL);
|
||||
return std::abs((DayOfYear(_year, _month, _day) - DayOfYear(year_, month_, day_)) * 86400LL);
|
||||
}
|
||||
// Is the start year greater than the end year?
|
||||
else if (_year > year_)
|
||||
|
@@ -516,7 +516,7 @@ static SQInteger SplitWhereCharImpl(HSQUIRRELVM vm, int(*fn)(int), bool neg)
|
||||
if ((fn(*itr) == 0) == neg)
|
||||
{
|
||||
// Are there any characters before this match?
|
||||
if ((itr - last) > 0 && (last != '\0'))
|
||||
if ((itr - last) > 0 && (*last != '\0'))
|
||||
{
|
||||
// Push this chunk of string on the stack
|
||||
sq_pushstring(vm, last, itr - last);
|
||||
|
Reference in New Issue
Block a user