mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	fix: update memcpy call in add_timer method to include size for lamp_name
This commit is contained in:
		| @@ -234,7 +234,7 @@ bool DynamicLampComponent::add_timer(std::string lamp_name, bool timer_active, u | ||||
|   unsigned char lamp_name_buffer[32]; | ||||
|   strncpy(static_cast<char*>(static_cast<void*>(&lamp_name_buffer)), lamp_name.c_str(), 32); | ||||
|   DynamicLampTimer new_timer; | ||||
|   memcpy(new_timer.lamp_name, lamp_name_buffer); | ||||
|   memcpy(new_timer.lamp_name, lamp_name_buffer, 32); | ||||
|   new_timer.active = timer_active; | ||||
|   new_timer.mode = mode; | ||||
|   new_timer.hour = hour; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user