mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 17:45:37 +01:00
Make config.pl more resistant to misuse
This commit is contained in:
parent
61ee351af4
commit
7f9049baf4
@ -100,12 +100,12 @@ for my $line (@config_lines) {
|
||||
$line =~ s!^!//!;
|
||||
}
|
||||
} elsif ($action eq "unset") {
|
||||
if (!$done && $line =~ /^\s*#define\s*$name/) {
|
||||
if (!$done && $line =~ /^\s*#define\s*$name\b/) {
|
||||
$line = '//' . $line;
|
||||
$done = 1;
|
||||
}
|
||||
} elsif (!$done && $action eq "set") {
|
||||
if ($line =~ m!^(?://)?\s*#define\s*$name!) {
|
||||
if ($line =~ m!^(?://)?\s*#define\s*$name\b!) {
|
||||
$line = "#define $name";
|
||||
$line .= " $value" if defined $value && $value ne "";
|
||||
$line .= "\n";
|
||||
|
Loading…
Reference in New Issue
Block a user