-
Notifications
You must be signed in to change notification settings - Fork 39
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
nxcomp/src/Loop.cpp: Support NXTransDialog caption / title being pref… #1079
base: 3.6.x
Are you sure you want to change the base?
nxcomp/src/Loop.cpp: Support NXTransDialog caption / title being pref… #1079
Conversation
c430f1e
to
eb8c54a
Compare
eb8c54a
to
af91cad
Compare
else | ||
{ | ||
// Use what gets provided via NX_DIALOG_CAPTIONPREFIX (used in X2Go) | ||
strncpy(caption, caption_prefix, DEFAULT_STRING_LENGTH-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this strncpy is different from the one above regarding the number of characters to be copied. While both are technically correct they should at least be unified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you suggest a clean solution? (You are the C dev... ;-) ).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
str(n)cpy is always tricky. I would do the getenv only once. Then strdup either the result or the default. And free the dupped string at shutdown.
…ixed with a custom prefix string.
af91cad
to
63adc88
Compare
…ixed with a custom prefix string.