git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chris Larson" <clarson@kergoth.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] Fix bug in parse_color that prevented the user from changing the background colors.
Date: Tue, 5 Feb 2008 11:48:39 -0700	[thread overview]
Message-ID: <b6ebd0a50802051048s3db55f6yab79e8982fd81b81@mail.gmail.com> (raw)
In-Reply-To: <b6ebd0a50802051045t4949df68u7e405ea618403a31@mail.gmail.com>

On Feb 5, 2008 11:39 AM, Timo Hirvonen <tihirvon@gmail.com> wrote:
>
> Chris Larson <clarson@kergoth.com> wrote:
>
> > unable to convert the string in its entirety into an integer.
>
> > -    if (*name && !*end && i >= -1 && i <= 255)
> > +    if (*name && i >= -1 && i <= 255)
> >          return i;
> >      return -2;
> >  }
>
>
> My bug, sorry. I should have tested more.
>
> I think this new code accepts "7bold" (didn't test).  Maybe you should
> do something like this instead:
>
>        if (*name && (!*end || isspace(*end)) && i >= -1 && i <= 255)

Indeed, I should have tested more too :)  Just starting to mess with
the codebase, surprised at how clean it is (though I probably
shouldn't be).

> Untested of course.  BTW, your patch is whitespace corrupted.
>

Unsurprising... sometimes I really hate gmail :|  Anyone know if
there's a way to post with gmail without hosing the patch, or should I
switch to a non-web based solution?

Thanks,
-- 
Chris Larson - clarson at kergoth dot com
Dedicated Engineer - MontaVista - clarson at mvista dot com
Core Developer/Architect - TSLib, BitBake, OpenEmbedded, OpenZaurus

  parent reply	other threads:[~2008-02-05 18:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 17:34 [PATCH] Fix bug in parse_color that prevented the user from changing the background colors Chris Larson
2008-02-05 18:39 ` Timo Hirvonen
     [not found]   ` <b6ebd0a50802051045t4949df68u7e405ea618403a31@mail.gmail.com>
2008-02-05 18:48     ` Chris Larson [this message]
2008-02-05 18:58     ` Timo Hirvonen
2008-02-05 19:18       ` [PATCH] Fix parsing numeric color values Timo Hirvonen
2008-02-06  9:59         ` Junio C Hamano
2008-02-06 12:16           ` [PATCH v2] " Timo Hirvonen
2008-02-06 12:16           ` [PATCH] Add tests for diff/status color parser Timo Hirvonen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6ebd0a50802051048s3db55f6yab79e8982fd81b81@mail.gmail.com \
    --to=clarson@kergoth.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).