From 097927eb3ec482ede633263c7630975c55b47c66 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 14 Jan 2019 13:23:14 +0100 Subject: [PATCH] [libcalamares] Fix off-by-one in taking substring for value --- src/libcalamares/utils/NamedSuffix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcalamares/utils/NamedSuffix.h b/src/libcalamares/utils/NamedSuffix.h index 4da829ad7..97568d1da 100644 --- a/src/libcalamares/utils/NamedSuffix.h +++ b/src/libcalamares/utils/NamedSuffix.h @@ -75,7 +75,7 @@ public: for( const auto suffix : table.table ) 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; break; }