Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f048f7f

Browse files
Improve code readability
1 parent 240388e commit f048f7f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎libraries/WiFiS3/src/Modem.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,16 +289,16 @@ ModemClass::ParseResult ModemClass::buf_read(const string &prompt, string &data_
289289
* in case multiple parameters separated by ',' are sent, they will be present in data_res
290290
* - if we encounter <CR> we need to wait for <LF>
291291
* - if we encounter <LF> we need to parse the response status
292-
* - if we encounter '|', the next token will contain binary sized data, the current value in
292+
* - if we encounter '|', the next token will contain binary sized data, the current value
293293
* in data_res contains the length of the next token
294294
*/
295295

296296
if(c == '|') { // sized read, the previous parameter is the length
297-
state = at_parse_state_t::Sized;
298-
299297
sized_read_size = atoi(data_res.c_str());
300298
data_res.clear();
301-
if (sized_read_size == 0) {
299+
if (sized_read_size != 0) {
300+
state = at_parse_state_t::Sized;
301+
} else {
302302
state = at_parse_state_t::Res;
303303
}
304304
} else if(c == '\r') {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /