From 5d9b45661de4d6371bfceb153170e3e279237165 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 28 Jun 2014 14:49:59 +0000 Subject: [PATCH] CGrammar: Correct handling of empty string literals during beautification --- PBot/VERSION.pm | 2 +- modules/c2english/c2eng.pl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 19ecd8b7..cf0b1279 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 684, + BUILD_REVISION => 685, BUILD_DATE => "2014-06-28", }; diff --git a/modules/c2english/c2eng.pl b/modules/c2english/c2eng.pl index 7675c19d..2923245f 100755 --- a/modules/c2english/c2eng.pl +++ b/modules/c2english/c2eng.pl @@ -81,7 +81,8 @@ foreach my $arg (@ARGV) { $output =~ s/of evaluate/of/g; foreach my $quote (@quotes) { - $output =~ s/"-*"/"$quote"/; + next unless $quote; + $output =~ s/"-+"/"$quote"/; } print $output;