[libcalamares] Fix off-by-one in taking substring for value

This commit is contained in:
Adriaan de Groot 2019-01-14 13:23:14 +01:00
parent 0648a3facf
commit 097927eb3e

View File

@ -75,7 +75,7 @@ public:
for( const auto suffix : table.table ) for( const auto suffix : table.table )
if ( s.endsWith( suffix.first ) ) if ( s.endsWith( suffix.first ) )
{ {
m_value = s.left( s.length() - suffix.first.length() + 1 ).toInt(); m_value = s.left( s.length() - suffix.first.length() ).toInt();
m_unit = suffix.second; m_unit = suffix.second;
break; break;
} }