Changeset 1b9d3cc


Ignore:
Timestamp:
Oct 26, 2009, 12:23:01 AM (15 years ago)
Author:
Geoffrey Thomas <geofft@mit.edu>
Branches:
master, release-1.10, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1ee5c79
Parents:
a3e61a2
git-author:
Karl Ramm <kcr@1ts.org> (10/25/09 23:35:27)
git-committer:
Geoffrey Thomas <geofft@mit.edu> (10/26/09 00:23:01)
Message:
atoi("puce") == 0

Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • util.c

    ra3e61a2 r1b9d3cc  
    430430{
    431431  int c, i;
     432  char *p;
    432433
    433434  for (i = 0; i < (sizeof(color_map)/sizeof(color_map[0])); i++)
     
    435436      return color_map[i].number;
    436437
    437   c = atoi(color);
    438   if (c >= -1 && c < COLORS) {
     438  c = strtol(color, &p, 10);
     439  if (p != color && c >= -1 && c < COLORS) {
    439440    return(c);
    440441  }
Note: See TracChangeset for help on using the changeset viewer.