Merge pull request #560 from clasher113/main

bug fix
This commit is contained in:
MihailRis 2025-07-20 19:33:30 +03:00 committed by GitHub
commit 98296d91ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 11 deletions

View File

@ -66,8 +66,9 @@ function on_sensor_enter(index, oid)
local stack = item.stack_size(dropitem.id)
local sum = dropitem.count + odrop.count
if sum <= stack then
dropitem.count = sum
other:despawn()
dropitem.count = 0
odrop.count = sum
entity:despawn()
end
end
end

View File

@ -435,19 +435,21 @@ dv::value BasicParser<CharT>::parseNumber(int sign) {
static_cast<int64_t>(std::log10(afterdot) + 1)
)
);
c = source[pos];
double dvalue = (value + (afterdot / (double)expo));
if (c == 'e' || c == 'E') {
pos++;
int s = 1;
if (peek() == '-') {
s = -1;
pos++;
} else if (peek() == '+') {
if (hasNext()){
c = source[pos];
if (c == 'e' || c == 'E') {
pos++;
int s = 1;
if (peek() == '-') {
s = -1;
pos++;
} else if (peek() == '+') {
pos++;
}
return sign * dvalue * power(10.0, s * parseSimpleInt(10));
}
return sign * dvalue * power(10.0, s * parseSimpleInt(10));
}
return sign * dvalue;
}