From 453da8e540b1c53d357b897d6c70372cd4633390 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 24 May 2017 12:15:52 +0200 Subject: [PATCH] convert-modeswitch.pl: fix message indices Avoid treating index 0 the same way as not defined. Signed-off-by: Felix Fietkau --- convert-modeswitch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert-modeswitch.pl b/convert-modeswitch.pl index 7b2323b..6930e5f 100755 --- 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; }; -- 2.30.2