@@ -745,7 +745,7 @@ Array<std::string> Component::getStateVariableNames() const
745745 std::string::size_type front = subCompName.find_first_not_of (" \t\r\n " );
746746 std::string::size_type back = subCompName.find_last_not_of (" \t\r\n " );
747747 std::string prefix = " " ;
748- if (back > front) // have non-whitespace name
748+ if (back >= front) // have non-whitespace name
749749 prefix = subCompName + " /" ;
750750 for (int j = 0 ; j<nsubs; ++j) {
751751 names.append (prefix + subnames[j]);
@@ -760,7 +760,7 @@ Array<std::string> Component::getStateVariableNames() const
760760 std::string::size_type front = subCompName.find_first_not_of (" \t\r\n " );
761761 std::string::size_type back = subCompName.find_last_not_of (" \t\r\n " );
762762 std::string prefix = " " ;
763- if (back > front) // have non-whitespace name
763+ if (back >= front) // have non-whitespace name
764764 prefix = subCompName+" /" ;
765765 for (int j =0 ; j<nsubs; ++j){
766766 names.append (prefix+subnames[j]);
@@ -774,7 +774,7 @@ Array<std::string> Component::getStateVariableNames() const
774774 std::string::size_type front = subCompName.find_first_not_of (" \t\r\n " );
775775 std::string::size_type back = subCompName.find_last_not_of (" \t\r\n " );
776776 std::string prefix = " " ;
777- if (back > front) // have non-whitespace name
777+ if (back >= front) // have non-whitespace name
778778 prefix = subCompName + " /" ;
779779 for (int j = 0 ; j<nsubs; ++j) {
780780 names.append (prefix + subnames[j]);
0 commit comments