Skip to content

Commit

Permalink
fixed SERVER_SET_SAVED_SETTINGS
Browse files Browse the repository at this point in the history
  • Loading branch information
BrokeStudio committed Nov 8, 2023
1 parent 194b062 commit 5c59006
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Core/NES/Mappers/Homebrew/RainbowESP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,10 @@ void BrokeStudioFirmware::processBufferedMessage()
case toesp_cmds_t::SERVER_SET_SAVED_SETTINGS:
{
UDBG("[Rainbow] ESP received command SERVER_SET_SAVED_SETTINGS");
if(message_size >= 5) {
if(message_size == 1) {
this->default_server_settings_port = 0;
this->default_server_settings_address = "";
} else if(message_size >= 5) {
this->default_server_settings_port =
(static_cast<uint16_t>(this->rx_buffer.at(2)) << 8) +
(static_cast<uint16_t>(this->rx_buffer.at(3)));
Expand Down

0 comments on commit 5c59006

Please sign in to comment.