diff --git a/du6/program.c b/du6/program.c index 45235fa..2660a36 100644 --- a/du6/program.c +++ b/du6/program.c @@ -13,7 +13,7 @@ int main(){ for(int i = 0; fgets(inputs[i], 50, stdin) != NULL; i++){ if(i == 0){ - freePlaces = strtol(inputs[0], &ptr, 10); + freePlaces = (int) strtol(inputs[0], &ptr, 10); if(freePlaces < 0 || !isdigit(freePlaces)){ printf("Nespravny vstup %d\n", freePlaces); }