ex00: fix: value are good
This commit is contained in:
parent
a4838511eb
commit
76f13820ad
@ -170,12 +170,12 @@ static int get_input(const std::string& file_path, const std::map<unsigned int,
|
||||
if (!check_line(line, reegex, " | ", INPUT, line_parsed))
|
||||
{
|
||||
std::map<unsigned int, float>::const_iterator it = database.upper_bound(line_parsed.first);
|
||||
if (it->first < line_parsed.first)
|
||||
if (it == database.begin())
|
||||
std::cout << "Error: bad input => " << utodate(line_parsed.first) << std::endl;
|
||||
else
|
||||
std::cout << utodate(line_parsed.first)
|
||||
<< " => " << line_parsed.second
|
||||
<< " = " << line_parsed.second * it->second << std::endl;
|
||||
<< " = " << line_parsed.second * (--it)->second << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user