From a7057d69650841386a4003a6616e30b6304f8dcb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 10 Jul 2011 21:50:00 +0000 Subject: Make an empty-string non-affirmative so that AxisView::set_marked_for_display works properly when the visible gui property does not exist. git-svn-id: svn://localhost/ardour2/branches/3.0@9833 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/utils.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libs') diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index e1cd35398b..4b7fdc2f91 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -561,6 +561,10 @@ string_is_affirmative (const std::string& str) { /* to be used only with XML data - not intended to handle user input */ + if (str.empty ()) { + return false; + } + return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length())); } -- cgit v1.2.3