1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-26 19:37:40 +00:00

sag:: fixed some warnings

This commit is contained in:
Zeno Rogue
2024-07-24 19:29:12 +02:00
parent 0a3653f7fd
commit 04098490d3
4 changed files with 6 additions and 6 deletions

View File

@@ -173,7 +173,7 @@ void load_sag_solution(const string& fname) {
void load_sag_solution_basic(const string& fname) {
if(!(state & SS_DATA)) throw hr_exception("load_sag_solution_basic with no data");
FILE *f = fopen(fname.c_str(), "rt");
for(auto& i: sagid) fscanf(f, "%d", &i);
for(auto& i: sagid) if(fscanf(f, "%d", &i) < 1) throw hr_exception("read error in load_sag_solution_basic");
fclose(f);
println(hlog, "loaded sagid = ", sagid);