Changeset 557:6376b0700e63

Show
Ignore:
Timestamp:
06/01/08 10:34:03 (7 months ago)
Author:
David Anderson <dave@…>
Branch:
default
Message:

Fix ato[us]32 error condition to actually error on invalid input.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • nxos/base/util.c

    r556 r557  
    106106 
    107107    /* If one character is invalid, fail by returning 0. */ 
    108     if (c < '0' && c > '9') { 
     108    if (c < '0' || c > '9') { 
    109109      return 0; 
    110110    } 
     
    136136 
    137137    /* If one character is invalid, fail by returning 0. */ 
    138     if (c < '0' && c > '9') { 
     138    if (c < '0' || c > '9') { 
    139139      return 0; 
    140140    }