projects
/
project
/
usbmode.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22f041e
)
convert-modeswitch.pl: fix message indices
author
Felix Fietkau
<nbd@nbd.name>
Wed, 24 May 2017 10:15:52 +0000
(12:15 +0200)
committer
Felix Fietkau
<nbd@nbd.name>
Wed, 24 May 2017 10:15:54 +0000
(12:15 +0200)
Avoid treating index 0 the same way as not defined.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
convert-modeswitch.pl
patch
|
blob
|
history
diff --git
a/convert-modeswitch.pl
b/convert-modeswitch.pl
index 7b2323b51860c821839c7917ae81ae99bb0a24bb..6930e5f8d66864e72ada4b15e783fa5bc822b067 100755
(executable)
--- a/
convert-modeswitch.pl
+++ b/
convert-modeswitch.pl
@@
-9,7
+9,7
@@
sub add_message {
my $msg = shift;
my $val = $messages{$msg};
-
$val
or do {
+
defined($val)
or do {
$val = $msg_ctr++;
$messages{$msg} = $val;
};