[libcalamares] Fix off-by-one in taking substring for value
This commit is contained in:
parent
0648a3facf
commit
097927eb3e
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user