diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-03-31 10:32:31 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-03-31 10:32:31 +0000 |
commit | 02923c4d7b67f52f542ecfde27a4de7398ceb27a (patch) | |
tree | 52c6a6026bf5858f0a797b5fb2d4e6c18ed3a964 /games/atc/update.c | |
parent | edf23419dd05122e7212939a3000502071de375d (diff) |
fix number conversion logic; spotted by pat@; ok tedu@ pat@
Diffstat (limited to 'games/atc/update.c')
-rw-r--r-- | games/atc/update.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/games/atc/update.c b/games/atc/update.c index 40f6cbb3a41..a97a854d0a4 100644 --- a/games/atc/update.c +++ b/games/atc/update.c @@ -1,4 +1,4 @@ -/* $OpenBSD: update.c,v 1.10 2006/03/27 00:10:14 tedu Exp $ */ +/* $OpenBSD: update.c,v 1.11 2006/03/31 10:32:30 otto Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -45,7 +45,7 @@ #if 0 static char sccsid[] = "@(#)update.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: update.c,v 1.10 2006/03/27 00:10:14 tedu Exp $"; +static char rcsid[] = "$OpenBSD: update.c,v 1.11 2006/03/31 10:32:30 otto Exp $"; #endif #endif /* not lint */ @@ -263,12 +263,12 @@ name(const PLANE *p) int number(char l) { - if ((l < 'a' && l > 'z') || (l < 'A' && l > 'Z')) - return (-1); - else if (l >= 'a' && l <= 'z') + if (l >= 'a' && l <= 'z') return (l - 'a'); - else + else if (l >= 'A' && l <= 'Z') return (l - 'A'); + else + return (-1); } int |