diff --git a/src/homemade_speedstep.c b/src/homemade_speedstep.c index a7261fd..5711f7d 100644 --- a/src/homemade_speedstep.c +++ b/src/homemade_speedstep.c @@ -187,9 +187,9 @@ int main(int argc, char** argv){ char* char_temperature = malloc(sizeof(char) * 8); getfilec(curtempfile, char_temperature); newlinetonullbyte(char_temperature); - int temperature = stringtoint(temperature, stringlength(temperature)); + int temperature = stringtoint(char_temperature, stringlength(char_temperature)); /* check if current temp is higher than max and step down */ - if (tempreature >= maxtemp && curstep < stepc - 1){ + if (temperature >= maxtemp && curstep < stepc - 1){ curstep++; curmaxfile = fopen(MAXSPDPATH, "w"); if (curmaxfile == NULL){