summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 346c3bcfa..6fa909824 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -615,7 +615,7 @@ sub sanitize_ver {
my ($string) = @_;
my ($name, $main_version, undef, $extraversion, $rest) =
- $string =~ m!(.*)(\d+\.\d+\.\d+)(-((?:pre|rc)\d+))?(.*)!;
+ $string =~ m!^(.*?-)(\d+(?:\.\d+)*)(-((?:pre|rc)\d+))?(.*)$!;
if (my ($mdkver, $cpu, $nproc, $mem) = $rest =~ m|-(.+)-(.+)-(.+)-(.+)|) {
$rest = "$cpu$nproc$mem-$mdkver";