Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

C string comparision: llfloaterabout.cp

#28

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

Reported by balp · December 11th, 2008 @ 02:15 PM

State: done
Milestone: 1.0.0 Release
Assigned to: Jacek Antonelli Jacek Antonelli

Activity

  1. Jacek Antonelli
    Jacek Antonelli
    • 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

    December 11th, 2008 @ 08:42 PM

  2. balp
    balp

    Yeah C is not intuitive, std::string works with ==, char * don't.

    December 12th, 2008 @ 05:45 AM

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.