Berry fix `light.get` for separate RGB/CT (#21818)

This commit is contained in:
s-hadinger 2024-07-22 20:38:14 +02:00 committed by GitHub
parent f42e44a69d
commit e085cfd3ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
### Changed
### Fixed
- Berry fix `light.get` for separate RGB/CT
### Removed

View File

@ -130,7 +130,7 @@ extern "C" {
int32_t top = be_top(vm); // Get the number of arguments
if (top == 0 || (top == 1 && be_isint(vm, 1))) {
int32_t light_num = 0;
if (top > 1) {
if (top > 0) {
light_num = be_toint(vm, 1);
}
push_getlight(vm, light_num);