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

logic error in tNMEA0183::Init(...) #22

Open
lsoltero opened this issue Apr 8, 2021 · 1 comment
Open

logic error in tNMEA0183::Init(...) #22

lsoltero opened this issue Apr 8, 2021 · 1 comment

Comments

@lsoltero
Copy link

lsoltero commented Apr 8, 2021

should this
bool tNMEA0183Msg::Init(const char *_MessageCode, const char *_Sender, char _Prefix) {
Clear();
size_t nSender=2;
size_t nMessageCode=0;
if ( _Sender==0 && (nSender=strlen(_Sender))>7 ) return false;

did you mean

if ( _Sender==0 || (nSender=strlen(_Sender))>7 ) return false;

g++ is complaining...

@ttlappalainen
Copy link
Owner

Yes. Luckily _Sender has not been 0. I'll do update. There was an other fix too! I'll note you on version history - OK?

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

No branches or pull requests

2 participants