C string comparision: llfloaterabout.cp
Reported by balp | December 11th, 2008 @ 02:15 PM | in 1.0.0 Release
Comaring c-string addresses are not sure to work as intended, strcmp better solution. ( Also sent in mail to Jacek.)
---
linden/indra/newview/llfloaterabout.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp
index 59e3100..7a0dd84 100644
--- a/linden/indra/newview/llfloaterabout.cpp
+++ b/linden/indra/newview/llfloaterabout.cpp
@@ -268,8 +268,10 @@ static std::string get_viewer_release_notes_url()
std::ostringstream test_version;
- if(IMP_VERSION_TEST != "")
- test_version << "#" << "Imprudence_" << version.str() << "_" << IMP_VERSION_TEST;
+ if(strcmp(IMP_VERSION_TEST,"")) {
+ test_version << "#" << "Imprudence_" << version.str() << "_"
+ << IMP_VERSION_TEST;
+ }
std::ostringstream url;
url << RELEASE_NOTES_BASE_URL << version.str() << test_version.str();
--
1.5.6.3
Comments and changes to this ticket
-
Jacek Antonelli December 11th, 2008 @ 08:42 PM
- State changed from new to done
- Milestone set to 1.0.0 Release
Thanks again, balp! I've told McCabe about strcmp, so hopefully we won't have any more of this type of mistake in the future. :D
-
balp December 12th, 2008 @ 05:45 AM
Yeah C is not intuitive, std::string works with ==, char * don't.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Open source metaverse (Second Life) viewer with an emphasis on usability and bold changes.