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 stack = item.stack_size(dropitem.id)
local sum = dropitem.count + odrop.count local sum = dropitem.count + odrop.count
if sum <= stack then if sum <= stack then
dropitem.count = sum dropitem.count = 0
other:despawn() odrop.count = sum
entity:despawn()
end end
end end
end end

View File

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