atoi: unexpected behaviour

I am reading a mapping file (tab spaced columns) and for each line that the program reads it should extract the numbers and store it in some variables.
The problem begin with the second column in the file. I have checked that I am reading the right value, just showing its (string) value in the screen. But when I try to make the conversion to int with atoi it only return the tens of the value. I am trying to read values not bigger than 63 and I am only getting values from 0 to 6, corresponding to the tens.
Could somebody help me with this strange (to me) problem?
It's hard to know what the problem is without seeing the code. If I must guess I would say the string that you pass to atoi is probably not what you think it is.
Topic archived. No new replies allowed.