genini: message field always emitted

Christopher Faylor cgf-use-the-mailinglist-please@cygwin.com
Fri Mar 12 06:13:00 GMT 2010


On Thu, Mar 11, 2010 at 09:26:38PM -0500, Charles Wilson wrote:
>Christopher Faylor wrote:
>> genini shouldn't assume that message is required and setup.exe shouldn't
>> have to care about blank messages.
>> 
>> Btw, the syntax is (or should be):
>> 
>> message keyword "something"
>> 
>> That's why you're seeing a syntax error.
>
>@@ -87,8 +93,10 @@ sub get {
>     my $val = shift;
> 
>     if ($keyhint eq 'message') {
>-	my ($kw, $rest) = /^(\S+)\s+(.*)$/;
>-	return $kw . ' ' . get($FH, 'ldesc', $rest);
>+	if ($val) {
>+	    my ($kw, $rest) = $val =~ /^(\S+)\s+(.*)$/;
>+	    return $kw . ' ' . get($FH, 'ldesc', $rest);
>+	}

This should be checking that $val exists and issuing a syntax error
if not.  Otherwise, it looks ok.

cgf



More information about the Cygwin-apps mailing list