Changeset 1b9d3cc988eca748bb848a9e8e8c38c6b4022dfd
- Timestamp:
- 10/26/09 00:23:01 (4 weeks ago)
- Author:
- Geoffrey Thomas <geofft@mit.edu>
- git-author:
- Karl Ramm <kcr@1ts.org> / 2009-10-25T23:35:27Z-0400
- Parents:
- a3e61a29065fa8b947f06870ee2a0c52108398b3
- Children:
- 1ee5c79201bda5ae7debf1c06a41c4813cebb496
- git-committer:
- Geoffrey Thomas <geofft@mit.edu> / 2009-10-26T00:23:01Z-0400
- Message:
-
atoi("puce") == 0
Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
ra3e61a2
|
r1b9d3cc
|
|
| 430 | 430 | { |
| 431 | 431 | int c, i; |
| | 432 | char *p; |
| 432 | 433 | |
| 433 | 434 | for (i = 0; i < (sizeof(color_map)/sizeof(color_map[0])); i++) |
| … |
… |
|
| 435 | 436 | return color_map[i].number; |
| 436 | 437 | |
| 437 | | c = atoi(color); |
| 438 | | if (c >= -1 && c < COLORS) { |
| | 438 | c = strtol(color, &p, 10); |
| | 439 | if (p != color && c >= -1 && c < COLORS) { |
| 439 | 440 | return(c); |
| 440 | 441 | } |