buf[len-1]='\0';
len --;
}
- if ( (r->type == TYPE_LONG) && isdigit(*buf)) {
- *r->limit = atoi(buf);
+ if (r->type == TYPE_LONG) {
+ int val;
+ char *res=0;
+ errno=0;
+ val = strtol(buf,&res,0);
+ if ( !( (val==0 && res) || (errno!=0) ) )
+ *r->limit = val;
} else if ( (r->type == TYPE_PERS) && isalpha(*buf)) {
unsigned long int res;
res = vc_str2personalitytype(buf,len);