Skip to content

Commit

Permalink
Fixed error when disabling net flash
Browse files Browse the repository at this point in the history
  • Loading branch information
AEFeinstein committed Nov 16, 2018
1 parent b2656dc commit 2c11783
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fwsrc/commonservices.c
Expand Up @@ -565,6 +565,7 @@ CMD_RET_TYPE cmd_WiFi(char * buffer, int retsize, char * pusrdata, char *buffend


CMD_RET_TYPE cmd_Flash(char * buffer, int retsize, char *pusrdata, unsigned short len, char * buffend) {
#ifndef DISABLE_NET_REFLASH
uint32 chip_size_saved = flashchip->chip_size;
flashchip->chip_size = 0x01000000;
int nr = ParamCaptureAndAdvanceInt();
Expand Down Expand Up @@ -592,7 +593,6 @@ CMD_RET_TYPE cmd_Flash(char * buffer, int retsize, char *pusrdata, unsigned shor
int r = FlashRewriter( &pusrdata[2], len-2 );
buffprint( "!FM%d\r\n", r );
} break;

//Flash Write (FW#\n) <- # = byte pos. Reads until end-of-packet.
case 'w': case 'W':
{
Expand Down Expand Up @@ -691,6 +691,9 @@ CMD_RET_TYPE cmd_Flash(char * buffer, int retsize, char *pusrdata, unsigned shor

flashchip->chip_size = chip_size_saved;
return buffend - buffer;
#else
return 0;
#endif
} // END: cmd_Flash(...)


Expand Down

0 comments on commit 2c11783

Please sign in to comment.