Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return statement in NameList::get() method #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Renan0eng
Copy link

I was trying to compile the project on an ESP8266 and encountered this error:

the fix was simple, just moving the return statement of the function "NameList::get(int num)" from line 60 to 61 in the file "NameList.cpp", here's the code:
[code]
I would like others not to have the same error, even though it's a simple mistake, beginners might get discouraged and waste hours. Thank you in advance.

the fix was simple, just moving the return statement of the function "NameList::get(int num)" from line 60 to 61 in the file "NameList.cpp", here's the code:

String NameList::get(int num) {
  String returnStr;
  if (num >= 0) {
    for (int h = 0; h < nameLength; h++) {
      if (names[num][h] != 0x00) returnStr += (char)names[num][h];
    }
    returnStr.trim();
  }
  return returnStr;
}

I would like others not to have the same error, even though it's a simple mistake, beginners might get discouraged and waste hours. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant