diff --git a/Landscape.cpp b/Landscape.cpp index d1a26df..ea6d734 100644 --- a/Landscape.cpp +++ b/Landscape.cpp @@ -2281,11 +2281,13 @@ int Landscape::readCosts(string fname) #else if (header != "ncols" && header != "NCOLS") { #endif - costs.close(); costs.clear(); - return -1; - } - costs >> maxXcost >> header >> maxYcost >> header >> minLongCost; - costs >> header >> minLatCost >> header >> resolCost >> header >> NODATACost; + costs.close(); costs.clear(); + return -1; +} +double tmpresolCost; +costs >> maxXcost >> header >> maxYcost >> header >> minLongCost; +costs >> header >> minLatCost >> header >> tmpresolCost >> header >> NODATACost; +resolCost = (int) tmpresolCost; #if !RS_RCPP MemoLine("Loading costs map. Please wait...");