makes sure timeppassed is not infinitely increased
This commit is contained in:
parent
e6160e1664
commit
e80c7c3807
|
@ -183,7 +183,9 @@ int main(int argc, char** argv){
|
||||||
FILE* curtempfile;
|
FILE* curtempfile;
|
||||||
/* from here onwards an infinite while loop should start */
|
/* from here onwards an infinite while loop should start */
|
||||||
while((curtempfile = fopen(CURTEMPPATH, "r")) != NULL){
|
while((curtempfile = fopen(CURTEMPPATH, "r")) != NULL){
|
||||||
timepassed++;
|
if (timepassed < 61){
|
||||||
|
timepassed++;
|
||||||
|
}
|
||||||
char* char_temperature = malloc(sizeof(char) * 8);
|
char* char_temperature = malloc(sizeof(char) * 8);
|
||||||
getfilec(curtempfile, char_temperature);
|
getfilec(curtempfile, char_temperature);
|
||||||
newlinetonullbyte(char_temperature);
|
newlinetonullbyte(char_temperature);
|
||||||
|
|
Loading…
Reference in New Issue